Skip to content

Commit

Permalink
fix(dockerfile): add python3 and cup-devs to package of step 2
Browse files Browse the repository at this point in the history
(docker-compose.yml) adjust expose port of fastify
(release.yml) add CORS_WHITE_LIST to .env
  • Loading branch information
quannhg committed Oct 21, 2023
1 parent 123ae77 commit ebf9e5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ jobs:
echo $CR_PAT | docker login ${{ env.REGISTRY }} -u ${{ env.CD_USERNAME }} --password-stdin
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
mkdir -p $HOME/ssps-be-test-cd && cd $HOME/ssps-be-test-cd
mkdir -p $HOME/ssps-be && cd $HOME/ssps-be
rm -f .env
echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env
echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env
echo POSTGRES_DB=${{ secrets.POSTGRES_DB }} >> .env
echo POSTGRES_URL=${{ env.POSTGRES_URL }} >> .env
echo CORS_WHITE_LIST=${{ secrets.CORS_WHITE_LIST }} >> .env
echo COOKIE_SECRET=${{ secrets.COOKIE_SECRET }} >> .env
echo JWT_SECRET=${{ secrets.JWT_SECRET }} >> .env
echo MINIO_URL=${{ secrets.MINIO_URL }} >> .env
Expand All @@ -94,9 +95,7 @@ jobs:
echo MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }} >> .env
echo MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }} >> .env
echo MINIO_BUCKET_NAME=${{ secrets.MINIO_BUCKET_NAME }} >> .env
curl -s ${{secrets.DOCKER_COMPOSE_RAW_FILE_URL}} -O -f
docker compose stop ${{vars.DOCKER_COMPOSE_DEPLOY_SERVICE_NAME}}
docker compose rm -f ${{vars.DOCKER_COMPOSE_DEPLOY_SERVICE_NAME}}
docker compose up -d ${{vars.DOCKER_COMPOSE_DEPLOY_SERVICE_NAME}}
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ COPY package.json ./dist/
FROM node:${NODE_VERSION}-alpine as production
WORKDIR /app

RUN apk --no-cache add python3 cups-dev

ENV NODE_ENV=production

COPY --chown=node:node --from=development /app/dist .
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.5"
services:
postgres:
image: postgres:15
container_name: postgres
container_name: ssps-db
env_file:
- .env
ports:
Expand Down Expand Up @@ -33,8 +33,8 @@ volumes:

networks:
ssps:
external:
name: ssps
name: ssps
external: true

# run the following command after docker compose up to create seed data:
# docker-compose exec fastify npx prisma db seed
Expand Down

0 comments on commit ebf9e5d

Please sign in to comment.