Move the configuration file to .env to support global variables

master
Pierre Jaury 8 years ago
parent 581a0882af
commit cf84b82c57

@ -4,6 +4,12 @@
# these few settings must however be configured before starting the mail # these few settings must however be configured before starting the mail
# server and require a restart upon change. # server and require a restart upon change.
# Project name
COMPOSE_PROJECT_NAME=freeposte
# Set this to the path where Freeposte data and configuration is stored
ROOT=/freeposte
# Set this to enable debugging globally # Set this to enable debugging globally
DEBUG=False DEBUG=False

@ -6,98 +6,95 @@ services:
# build: nginx # build: nginx
image: freeposte/reverse-proxy image: freeposte/reverse-proxy
restart: always restart: always
env_file: freeposte.env env_file: .env
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
links:
- webmail
- admin
volumes: volumes:
- /freeposte/certs:/certs - "$ROOT/certs:/certs"
redis: redis:
image: redis image: redis
restart: always restart: always
volumes: volumes:
- /freeposte/redis:/data - "$ROOT/redis:/data"
imap: imap:
# build: dovecot # build: dovecot
image: freeposte/dovecot image: freeposte/dovecot
restart: always restart: always
env_file: freeposte.env env_file: .env
ports: ports:
- "143:143" - "143:143"
- "993:993" - "993:993"
volumes: volumes:
- /freeposte/freeposte:/data - "$ROOT/freeposte:/data"
- /freeposte/mail:/mail - "$ROOT/mail:/mail"
- /freeposte/certs:/certs - "$ROOT/certs:/certs"
- /freeposte/overrides:/overrides - "$ROOT/overrides:/overrides"
smtp: smtp:
# build: postfix # build: postfix
image: freeposte/postfix image: freeposte/postfix
restart: always restart: always
env_file: freeposte.env env_file: .env
ports: ports:
- "25:25" - "25:25"
- "465:465" - "465:465"
- "587:587" - "587:587"
volumes: volumes:
- /freeposte/freeposte:/data - "$ROOT/freeposte:/data"
- /freeposte/certs:/certs - "$ROOT/certs:/certs"
- /freeposte/overrides:/overrides - "$ROOT/overrides:/overrides"
milter: milter:
# build: rmilter # build: rmilter
image: freeposte/rmilter image: freeposte/rmilter
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/filter:/data - "$ROOT/filter:/data"
- /freeposte/dkim:/dkim - "$ROOT/dkim:/dkim"
- /freeposte/overrides:/overrides - "$ROOT/overrides:/overrides"
antispam: antispam:
# build: rspamd # build: rspamd
image: freeposte/rspamd image: freeposte/rspamd
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/filter:/var/lib/rspamd - "$ROOT/filter:/var/lib/rspamd"
antivirus: antivirus:
# build: clamav # build: clamav
image: freeposte/clamav image: freeposte/clamav
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/filter:/data - "$ROOT/filter:/data"
admin: admin:
# build: admin # build: admin
image: freeposte/admin image: freeposte/admin
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/freeposte:/data - "$ROOT/freeposte:/data"
- /freeposte/dkim:/dkim - "$ROOT/dkim:/dkim"
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
webmail: webmail:
# build: roundcube # build: roundcube
image: freeposte/roundcube image: freeposte/roundcube
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/webmail:/data - "$ROOT/webmail:/data"
fetchmail: fetchmail:
# build: fetchmail # build: fetchmail
image: freeposte/fetchmail image: freeposte/fetchmail
restart: always restart: always
env_file: freeposte.env env_file: .env
volumes: volumes:
- /freeposte/freeposte:/data - "$ROOT/freeposte:/data"

Loading…
Cancel
Save