Skip to content

Commit

Permalink
chore: fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPorfirio01 committed Jan 2, 2025
1 parent 469c9ae commit ea5bc88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:20-alpine AS builder

# Definir o build argument
# Define build argument
ARG DATABASE_URL

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

# Instalar OpenSSL e outras dependências necessárias
Expand Down Expand Up @@ -47,6 +47,10 @@ RUN cd apps/api && \
# Imagem de produção
FROM node:20-alpine

# Define build argument and environment variable in production stage
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}

# Create user earlier and set permissions properly
RUN addgroup -S appgroup && adduser -S appuser -G appgroup

Expand Down

0 comments on commit ea5bc88

Please sign in to comment.