[add] Init from base

This commit is contained in:
2022-05-08 16:06:16 -06:00
parent 69f8b5a79f
commit 70560bb34e
32 changed files with 2828 additions and 0 deletions

1
database/.dockerignore Normal file
View File

@@ -0,0 +1 @@
Dockerfile

7
database/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM postgres:12-alpine
# So that the timezone can be sent with the TZ environment
RUN apk add --no-cache tzdata
# Starting scripts
ADD . /docker-entrypoint-initdb.d

9
database/docker-init.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd /docker-entrypoint-initdb.d/
find "$PWD" -type f -name "*.sql" | sort | \
while read l; do
# The env variables are set by docker-compose and taken from the .env file
psql -d $POSTGRES_DB -U $POSTGRES_USER -f "$d/$l";
done