Skip to content

Commit

Permalink
Merge pull request #176 from pluginpal/feature/test-server-deployment
Browse files Browse the repository at this point in the history
fix: test deployment
  • Loading branch information
boazpoolman authored Aug 19, 2024
2 parents 243cc82 + 20b9971 commit 0cd7e6e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy-test-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ jobs:
- name: Build the packages
run: yarn run build

- name: Remove the installed dependencies
run: rm -rf node_modules

- name: Build a Docker image of the playground
run: |
cd playground
docker build \
--build-arg PUBLIC_URL=${{ secrets.TEST_URL }} \
-t strapi-playground:latest .
Expand All @@ -58,7 +56,7 @@ jobs:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_CI_USERNAME }}
password: ${{ secrets.SSH_CI_PASSWORD }}
source: strapi-playground-latest.tar
source: playground/strapi-playground-latest.tar
target: /var/lib/dokku/data/storage/strapi/docker-images

- name: Deploy the Dokku app based on the Docker image
Expand All @@ -69,7 +67,7 @@ jobs:
password: ${{ secrets.SSH_CI_PASSWORD }}
script_stop: true
script: |
sudo docker load -i /var/lib/dokku/data/storage/strapi/docker-images/strapi-playground-latest.tar
sudo docker load -i /var/lib/dokku/data/storage/strapi/docker-images/playground/strapi-playground-latest.tar
STRAPI_LATEST_IMAGE=$(sudo docker images --format "{{.ID}}" strapi-playground:latest)
sudo docker tag strapi-playground:latest strapi-playground:$STRAPI_LATEST_IMAGE
dokku git:from-image strapi strapi-playground:$STRAPI_LATEST_IMAGE
Expand Down
8 changes: 8 additions & 0 deletions playground/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.tmp/
.cache/
.git/
build/
node_modules/
.env
data/
backup/
4 changes: 2 additions & 2 deletions Dockerfile → playground/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ FROM node:18-alpine3.18
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev

WORKDIR /opt/
COPY playground/package.json playground/yarn.lock ./
COPY ./package.json ./yarn.lock ./
RUN npm config set fetch-retry-maxtimeout 600000 -g && yarn install

WORKDIR /opt/app
COPY playground .
COPY . .
ENV PATH /opt/node_modules/.bin:$PATH

# Register all the args passed through the build command
Expand Down

0 comments on commit 0cd7e6e

Please sign in to comment.