Skip to content

Commit

Permalink
chore: fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPorfirio01 committed Dec 31, 2024
1 parent 2c5ef7b commit 7e8440a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}

- name: Build docker image
run: docker build -t ${{secrets.DOCKER_USERNAME}}/chat_lucy_node_api:latest -f apps/api/Dockerfile .
run: docker build --build-arg DATABASE_URL="${{secrets.DATABASE_URL}}" -t ${{secrets.DOCKER_USERNAME}}/chat_lucy_node_api:latest -f apps/api/Dockerfile .

- name: Publish image
run: docker push ${{secrets.DOCKER_USERNAME}}/chat_lucy_node_api:latest
Expand Down
6 changes: 6 additions & 0 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM node:20-alpine AS builder

# Definir o build argument
ARG DATABASE_URL

# Passar o build argument para variável de ambiente
ENV DATABASE_URL=${DATABASE_URL}

WORKDIR /app

# Instalar pnpm
Expand Down

0 comments on commit 7e8440a

Please sign in to comment.