forked from ehrbase/ehrbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile_postgres
More file actions
27 lines (22 loc) · 872 Bytes
/
Dockerfile_postgres
File metadata and controls
27 lines (22 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ARG POSTGRES_VERSION
# syntax=docker/dockerfile:1
FROM postgres:${POSTGRES_VERSION}-alpine
RUN apk --no-cache add musl-locales
# SHOW POSTGRES SERVER AND CLIENT VERSION
RUN postgres -V; \
psql -V
# SET DEFAULT VALUES FOR DATABASE USER AND PASSWORDS
ARG EHRBASE_USER="ehrbase_restricted"
ARG EHRBASE_PASSWORD="ehrbase_restricted"
ARG EHRBASE_USER_ADMIN="ehrbase"
ARG EHRBASE_PASSWORD_ADMIN="ehrbase"
ARG POSTGRES_PASSWORD="postgres"
ENV EHRBASE_USER_ADMIN=${EHRBASE_USER_ADMIN}
ENV EHRBASE_PASSWORD_ADMIN=${EHRBASE_PASSWORD_ADMIN}
ENV EHRBASE_USER=${EHRBASE_USER}
ENV EHRBASE_PASSWORD=${EHRBASE_PASSWORD}
ENV POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# COPY DB SETUP SCRIPT TO POSTGRES's DEFAULT DOCKER ENTRYPOINT FOLDER
# NOTE: check postgres's docker docs for details
# https://hub.docker.com/_/postgres/
COPY createdb-docker.sql /docker-entrypoint-initdb.d/