infoalloggi-monorepo/apps/db/Dockerfile

19 lines
451 B
Text
Raw Normal View History

2025-08-04 17:45:44 +02:00
# Start a new stage for PostgreSQL
FROM postgres:16 AS postgres
# Set environment variables for PostgreSQL
ARG POSTGRES_USER
ARG POSTGRES_PASSWORD
ARG POSTGRES_DB
ENV POSTGRES_USER=$POSTGRES_USER
ENV POSTGRES_PASSWORD=$POSTGRES_PASSWORD
ENV POSTGRES_DB=$POSTGRES_DB
# Copy the schema.sql file to the docker-entrypoint-initdb.d directory
COPY ./initial/*.sql /docker-entrypoint-initdb.d/
# Expose the PostgreSQL port
EXPOSE 5432
CMD ["-p", "5432"]