1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-17 20:57:54 +02:00

Moved postgresql image in optional

This commit is contained in:
Ionut Filip 2018-12-03 17:57:43 +02:00
parent dd16ed4cba
commit 7809d1373a
2 changed files with 18 additions and 16 deletions

View File

@ -14,16 +14,6 @@ services:
volumes:
- "{{ root }}/redis:/data"
{% if db_flavor == 'postgresql' and postgresql == 'internal' %}
database:
image: ${DOCKER_ORG:-mailu}/postgresql:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/data/psql_db:/data"
- "{{ root }}/data/psql_backup:/backup"
{% endif %}
# Core services
front:
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-{{ version }}}
@ -157,6 +147,16 @@ services:
- imap
{% endif %}
{% if db_flavor == 'postgresql' and postgresql == 'internal' %}
database:
image: ${DOCKER_ORG:-mailu}/postgresql:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/data/psql_db:/data"
- "{{ root }}/data/psql_backup:/backup"
{% endif %}
{% if resolver_enabled or db_flavor == 'postgresql' %}
networks:
default:

View File

@ -13,12 +13,6 @@ services:
volumes:
- "{{ root }}/redis:/data"
{% if db_flavor == 'postgresql' and postgresql == 'internal' %}
database:
image: ${DOCKER_ORG:-mailu}/postgresql:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
{% endif %}
# Core services
front:
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-{{ version }}}
@ -149,6 +143,14 @@ services:
replicas: 1
{% endif %}
{% if db_flavor == 'postgresql' and postgresql == 'internal' %}
database:
image: ${DOCKER_ORG:-mailu}/postgresql:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
volumes:
- "{{ root }}/data/psql_backup:/backup"
{% endif %}
networks:
default:
driver: overlay