[TOOLS][DOCKER] Rewrite the configuration script to use whiptail/dialog, and refactor

This commit is contained in:
2021-03-20 23:09:50 +00:00
parent ea6623f029
commit 2f570fcc2a
18 changed files with 594 additions and 525 deletions

View File

@@ -0,0 +1,31 @@
#!/usr/bin/sh
if [ "${DBMS}" = 'postgres' ]; then
cat <<EOF
db:
image: postgres:alpine
restart: always
tty: false
ports:
- 5432:5432
environment:
- PGDATA=/var/lib/postgres/data
env_file:
- ./docker/db/db.env
volumes:
- database:/var/lib/postgres/data
EOF
else
cat <<EOF
db:
image: mariadb
restart: always
tty: false
ports:
- 3306:3306
env_file:
- ./docker/db/db.env
EOF
fi