feat: enforce postgres tls and separate database roles

This commit is contained in:
2026-11-30 16:36:14 +03:00
parent ea50b60f7f
commit 1d6b745015
7 changed files with 104 additions and 27 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ COPY test ./test
CMD ["npm", "test"]
FROM build AS migrate
CMD ["sh", "-c", "DATABASE_URL=\"$(cat \"$DATABASE_URL_FILE\")\" exec npx prisma migrate deploy"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-client \
&& rm -rf /var/lib/apt/lists/*
COPY infra/postgres/migrate.sh infra/postgres/grants.sql ./infra/postgres/
USER node
CMD ["sh", "/app/infra/postgres/migrate.sh"]
FROM build AS prod-deps
RUN npm prune --omit=dev