forked from openimis/database_postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
14 lines (11 loc) · 715 Bytes
/
Dockerfile
File metadata and controls
14 lines (11 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM postgres:13-alpine AS base
# Script to detect whether the database has finished initializing
COPY ["true_isready.sh", "/usr/local/bin/"]
COPY ["database scripts/00_dump.sql", "database scripts/0[2345]_*.sql", "database scripts/json_schema_extension.sql", "/docker-entrypoint-initdb.d/"]
# Install https://github.com/gavinwahl/postgres-json-schema/
# extension that allows validation of jsonb fields against jsonschema
COPY ["install_postgres_json_schema_extension.sh", "install_postgres_json_schema_extension.sh"]
RUN chmod u+x install_postgres_json_schema_extension.sh
RUN ./install_postgres_json_schema_extension.sh
FROM base AS demo
COPY ["database scripts/demo_db.sql", "/docker-entrypoint-initdb.d/"]