Skip to content

Commit

Permalink
fix(docker): install neccesary packets for node-printer at developmen…
Browse files Browse the repository at this point in the history
…t stage of Dockerfile

(release.yml) Also make sure specific folder for deploy is created
  • Loading branch information
quannhg committed Oct 19, 2023
1 parent 420637a commit 123ae77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
echo $CR_PAT | docker login ${{ env.REGISTRY }} -u ${{ env.CD_USERNAME }} --password-stdin
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
cd $HOME/thesis-222
mkdir -p $HOME/ssps-be-test-cd && cd $HOME/ssps-be-test-cd
rm -f .env
echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env
echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env
Expand All @@ -94,11 +94,12 @@ 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
# curl ${{secrets.DOCKER_COMPOSE_RAW_FILE_URL}} -o docker-compose.yml
docker-compose stop fastify
docker-compose rm -f fastify
docker-compose up -d fastify
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}}
docker logout ${{ env.REGISTRY }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ARG NODE_VERSION=18.13.0
FROM node:${NODE_VERSION}-alpine as development
WORKDIR /app

#Installing necessary packages for @thiagoelg/node-printer
RUN apk --no-cache add python3 cups-dev make g++

COPY package.json yarn.lock tsconfig.json tsconfig.compile.json jest.config.js ./
COPY ./src ./src
COPY ./prisma ./prisma
Expand Down

0 comments on commit 123ae77

Please sign in to comment.