docker: use dotenv for db container

pull/4/head
Cameron Clough 2022-03-12 17:35:50 +00:00
parent 3b9e9e9e0d
commit e8ea76c46a
No known key found for this signature in database
GPG Key ID: BFB3B74B026ED43F
3 changed files with 10 additions and 10 deletions

View File

@ -4,12 +4,12 @@ DB_FILE=database.sqlite
DB_NAME=retro-pilot
DB_USER=root
DB_PASS=root
DB_HOST=db
DB_HOST=db # If using docker compose, this should match the container service name
DB_PORT=5432
ALLOW_REGISTRATION=true
HTTP_INTERFACE=0.0.0.0
HTTP_PORT=3000
CAN_SEND_MAIL=true # Skips sending mail, all attempted mail is logged under DEBUG
CAN_SEND_MAIL=true # Set to false to skip sending mail, all attempted mail is logged under DEBUG
SMTP_HOST="localhost" # credentials for smtp server to send account registration mails. if not filled in, get the generated tokens from the server.log manually
SMTP_PORT=25
SMTP_USER=root

9
.gitignore vendored
View File

@ -8,11 +8,9 @@
node_modules/
# Data
realdata/
realdata
database
*.sqlite
!database.empty.sqlite
config.js
config_prod.js
test/.devKeys
# Miscellaneous
@ -20,4 +18,5 @@ test/.devKeys
*.log
.env
data/certbot
data/*
!data/nginx

View File

@ -17,7 +17,8 @@ services:
- '5438:5432'
volumes:
- ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
- ./data/postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: retro-pilot
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}