-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan
committed
Sep 11, 2023
1 parent
766cd5b
commit e4865c8
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
FROM postgres:13-alpine | ||
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/demo_db.sql", "database scripts/json_schema_extension.sql", "/docker-entrypoint-initdb.d/"] | ||
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/"] |