Merge .env files and add docker configurations for the nopaqued service.

This commit is contained in:
Patrick Jentsch 2020-01-06 09:36:51 +01:00
parent 852c8a22a6
commit 54b431c70c
6 changed files with 30 additions and 30 deletions

3
.gitignore vendored
View File

@ -1,6 +1,5 @@
# Files # Files
db.env *.env
web.env
# Directories # Directories

View File

@ -1,3 +0,0 @@
POSTGRES_DB_NAME=opaque
POSTGRES_USER=opaque
POSTGRES_PASSWORD=opaque

View File

@ -7,9 +7,7 @@ services:
depends_on: depends_on:
- db - db
- redis - redis
env_file: env_file: nopaque.env
- db.env
- web.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
volumes: volumes:
- /mnt/nopaque:/mnt/nopaque - /mnt/nopaque:/mnt/nopaque
@ -24,9 +22,7 @@ services:
daemon: daemon:
depends_on: depends_on:
- db - db
env_file: env_file: nopaque.env
- db.env
- web.env
extra_hosts: extra_hosts:
- "host.docker.internal:172.17.0.1" - "host.docker.internal:172.17.0.1"
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
@ -39,7 +35,7 @@ services:
- ../opaque_daemon/requirements.txt:/home/nopaqued/requirements.txt - ../opaque_daemon/requirements.txt:/home/nopaqued/requirements.txt
- $HOME/.docker:/home/nopaqued/.docker - $HOME/.docker:/home/nopaqued/.docker
db: db:
env_file: db.env env_file: nopaque.env
image: postgres:11 image: postgres:11
volumes: volumes:
- /srv/nopaque/database:/var/lib/postgresql/data - /srv/nopaque/database:/var/lib/postgresql/data

View File

@ -5,11 +5,9 @@ wait-for-it db:5432 --strict --timeout=0
echo "Waiting for redis..." echo "Waiting for redis..."
wait-for-it redis:6379 --strict --timeout=0 wait-for-it redis:6379 --strict --timeout=0
if [ $# -eq 0 ] if [ $# -eq 0 ]; then
then
venv/bin/python -u nopaque.py venv/bin/python -u nopaque.py
elif [ $1 == "flask" ] elif [ $1 == "flask" ]; then
then
echo "$@" echo "$@"
venv/bin/python -m $@ venv/bin/python -m $@
else else

24
nopaque.env.tpl Normal file
View File

@ -0,0 +1,24 @@
### Database ###
POSTGRES_DB_NAME=
POSTGRES_USER=
POSTGRES_PASSWORD=
### Docker ###
DOCKER_CERT_PATH=
DOCKER_HOST=
DOCKER_TLS_VERIFY=
### Flask ###
FLASK_CONFIG=
# SECRET_KEY=
### Flask-Mail ###
MAIL_SERVER=
MAIL_PORT=
MAIL_USE_TLS=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_DEFAULT_SENDER=
### nopaque ###
NOPAQUE_ADMIN=

View File

@ -1,14 +0,0 @@
### Flask ###
FLASK_CONFIG=production
# SECRET_KEY=
### Flask-Mail ###
MAIL_SERVER=smtp.example.com
MAIL_PORT=587
MAIL_USE_TLS=true
MAIL_USERNAME=username@example.com
MAIL_PASSWORD=password
MAIL_DEFAULT_SENDER=username@example.com
### nopaque ###
NOPAQUE_ADMIN=admin.opaque@example.com