Skip to content

Commit

Permalink
Sticking to one env-var management system (#2247)
Browse files Browse the repository at this point in the history
* Sticking to one env-var management system

Starting with the Postgres container so that you only have to set overlapping environment variables in one place.

* Moving Postfix envvars pt 1

* Moving Postfix envvars pt 2 .env file

* Added missing envvars.

* Adding functioning glue

Suggest something better if you wish.

* removed IP from example

* Removed default network from update.
  • Loading branch information
Leopere authored and Chocobozzz committed Nov 18, 2019
1 parent 6037544 commit e2882b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 7 additions & 2 deletions support/docker/production/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
PEERTUBE_DB_USERNAME=postgres_user
PEERTUBE_DB_PASSWORD=postgres_password
POSTGRES_USER=peertube
POSTGRES_PASSWORD=peertube
POSTGRES_DB=peertube
PEERTUBE_DB_USERNAME=$(POSTGRES_USER)
PEERTUBE_DB_PASSWORD=$(POSTGRES_PASSWORD)
PEERTUBE_DB_HOSTNAME=postgres
PEERTUBE_WEBSERVER_HOSTNAME=domain.tld
PEERTUBE_WEBSERVER_PORT=443
PEERTUBE_WEBSERVER_HTTPS=true
Expand All @@ -14,6 +18,7 @@ PEERTUBE_SMTP_FROM=noreply@domain.tld
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=admin@domain.tld
POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}
# /!\ Prefer to use the PeerTube admin interface to set the following configurations /!\
#PEERTUBE_SIGNUP_ENABLED=true
#PEERTUBE_TRANSCODING_ENABLED=true
Expand Down
10 changes: 4 additions & 6 deletions support/docker/production/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ services:

postgres:
image: postgres:10-alpine
environment:
POSTGRES_USER: ${PEERTUBE_DB_USERNAME}
POSTGRES_PASSWORD: ${PEERTUBE_DB_PASSWORD}
POSTGRES_DB: peertube
env_file:
- .env
volumes:
- ./docker-volume/db:/var/lib/postgresql/data
restart: "always"
Expand All @@ -67,8 +65,8 @@ services:

postfix:
image: mwader/postfix-relay
environment:
- POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}
env_file:
- .env
labels:
traefik.enable: "false"
restart: "always"
Expand Down

0 comments on commit e2882b2

Please sign in to comment.