diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/dockerfile b/dockerfile index 2954f8d..13942d3 100644 --- a/dockerfile +++ b/dockerfile @@ -12,10 +12,9 @@ RUN pnpm install --frozen-lockfile # Copy source COPY . . -# Required by prisma generate during image build -echo "DATABASE_URL=postgres://tvone:tvone_password@db:5432/tvone" > .env -echo "PORT=3000" >> .env -echo "NODE_ENV=production" >> .env +# Ensure env exists (optional safety for containers) +RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi + # Build NestJS RUN pnpm build