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
db.env
web.env
*.env
# 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:
- db
- redis
env_file:
- db.env
- web.env
env_file: nopaque.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
volumes:
- /mnt/nopaque:/mnt/nopaque
@ -24,9 +22,7 @@ services:
daemon:
depends_on:
- db
env_file:
- db.env
- web.env
env_file: nopaque.env
extra_hosts:
- "host.docker.internal:172.17.0.1"
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
@ -39,7 +35,7 @@ services:
- ../opaque_daemon/requirements.txt:/home/nopaqued/requirements.txt
- $HOME/.docker:/home/nopaqued/.docker
db:
env_file: db.env
env_file: nopaque.env
image: postgres:11
volumes:
- /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..."
wait-for-it redis:6379 --strict --timeout=0
if [ $# -eq 0 ]
then
if [ $# -eq 0 ]; then
venv/bin/python -u nopaque.py
elif [ $1 == "flask" ]
then
elif [ $1 == "flask" ]; then
echo "$@"
venv/bin/python -m $@
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