feat: enforce postgres tls and separate database roles
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user