Modify setup templates to allow for DOCKER_ORG and VERSION override. (Needed for Travis)

master
Tim Möhlmann 6 years ago
parent 928fbb372d
commit 72e931f4b4
No known key found for this signature in database
GPG Key ID: AFABC30066A39335

@ -5,7 +5,7 @@ addons:
packages:
- docker-ce
env:
- VERSION=$TRAVIS_BRANCH
- MAILU_VERSION=$TRAVIS_BRANCH
language: python
python:
- "3.6"
@ -13,10 +13,9 @@ install:
- pip install -r tests/requirements.txt
script:
# Default to mailu for DOCKER_ORG
- if [ -z "$DOCKER_ORG" ]; then export DOCKER_ORG="mailu"; fi
- docker-compose -f tests/build.yml build
- python tests/compose/test.py
# test.py, test name and timeout between start and tests.
- python tests/compose/test.py core 1
deploy:
provider: script

@ -16,7 +16,7 @@ services:
# Core services
front:
image: mailu/nginx:{{ version }}
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
logging:
@ -34,7 +34,7 @@ services:
- "{{ root }}/certs:/certs"
admin:
image: mailu/admin:{{ version }}
image: ${DOCKER_ORG:-mailu}/admin:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
{% if not admin_enabled %}
@ -48,7 +48,7 @@ services:
- redis
imap:
image: mailu/dovecot:{{ version }}
image: ${DOCKER_ORG:-mailu}/dovecot:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
@ -58,7 +58,7 @@ services:
- front
smtp:
image: mailu/postfix:{{ version }}
image: ${DOCKER_ORG:-mailu}/postfix:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
@ -69,7 +69,7 @@ services:
# Optional services
{% if antispam_enabled %}
antispam:
image: mailu/rspamd:{{ version }}
image: ${DOCKER_ORG:-mailu}/rspamd:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
@ -82,7 +82,7 @@ services:
{% if antivirus_enabled %}
antivirus:
image: mailu/clamav:{{ version }}
image: ${DOCKER_ORG:-mailu}/clamav:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
@ -91,7 +91,7 @@ services:
{% if webdav_enabled %}
webdav:
image: mailu/radicale:{{ version }}
image: ${DOCKER_ORG:-mailu}/radicale:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:
@ -100,7 +100,7 @@ services:
{% if fetchmail_enabled %}
fetchmail:
image: mailu/fetchmail:{{ version }}
image: ${DOCKER_ORG:-mailu}/fetchmail:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
{% endif %}
@ -108,7 +108,7 @@ services:
# Webmail
{% if webmail_type != 'none' %}
webmail:
image: mailu/{{ webmail_type }}:{{ version }}
image: ${DOCKER_ORG:-mailu}/{{ webmail_type }}:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
volumes:

@ -15,7 +15,7 @@ services:
# Core services
front:
image: mailu/nginx:{{ version }}
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
logging:
driver: {{ log_driver or 'json-file' }}
@ -31,7 +31,7 @@ services:
replicas: {{ front_replicas }}
admin:
image: mailu/admin:{{ version }}
image: ${DOCKER_ORG:-mailu}/admin:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
{% if not admin_enabled %}
ports:
@ -44,7 +44,7 @@ services:
replicas: {{ admin_replicas }}
imap:
image: mailu/dovecot:{{ version }}
image: ${DOCKER_ORG:-mailu}/dovecot:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
environment:
# Default to 10.0.1.0/24
@ -56,7 +56,7 @@ services:
replicas: {{ imap_replicas }}
smtp:
image: mailu/postfix:{{ version }}
image: ${DOCKER_ORG:-mailu}/postfix:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
environment:
- POD_ADDRESS_RANGE={{ subnet }}
@ -68,7 +68,7 @@ services:
# Optional services
{% if antispam_enabled %}
antispam:
image: mailu/rspamd:{{ version }}
image: ${DOCKER_ORG:-mailu}/rspamd:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
environment:
- POD_ADDRESS_RANGE={{ subnet }}
@ -82,7 +82,7 @@ services:
{% if antivirus_enabled %}
antivirus:
image: mailu/clamav:{{ version }}
image: ${DOCKER_ORG:-mailu}/clamav:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
volumes:
- "{{ root }}/filter:/data"
@ -92,7 +92,7 @@ services:
{% if webdav_enabled %}
webdav:
image: mailu/none:{{ version }}
image: ${DOCKER_ORG:-mailu}/none:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
volumes:
- "{{ root }}/dav:/data"
@ -102,7 +102,7 @@ services:
{% if fetchmail_enabled %}
fetchmail:
image: mailu/fetchmail:{{ version }}
image: ${DOCKER_ORG:-mailu}/fetchmail:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
volumes:
- "{{ root }}/data:/data"
@ -112,7 +112,7 @@ services:
{% if webmail_type != 'none' %}
webmail:
image: mailu/roundcube:{{ version }}
image: ${DOCKER_ORG:-mailu}/roundcube:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }}
volumes:
- "{{ root }}/webmail:/data"

@ -3,54 +3,54 @@ version: '3'
services:
front:
image: ${DOCKER_ORG:-mailu}/nginx:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-local}
build: ../core/nginx
imap:
image: ${DOCKER_ORG:-mailu}/dovecot:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/dovecot:${MAILU_VERSION:-local}
build: ../core/dovecot
smtp:
image: ${DOCKER_ORG:-mailu}/postfix:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/postfix:${MAILU_VERSION:-local}
build: ../core/postfix
antispam:
image: ${DOCKER_ORG:-mailu}/rspamd:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/rspamd:${MAILU_VERSION:-local}
build: ../services/rspamd
antivirus:
image: ${DOCKER_ORG:-mailu}/clamav:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/clamav:${MAILU_VERSION:-local}
build: ../optional/clamav
webdav:
image: ${DOCKER_ORG:-mailu}/radicale:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/radicale:${MAILU_VERSION:-local}
build: ../optional/radicale
admin:
image: ${DOCKER_ORG:-mailu}/admin:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/admin:${MAILU_VERSION:-local}
build: ../core/admin
roundcube:
image: ${DOCKER_ORG:-mailu}/roundcube:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/roundcube:${MAILU_VERSION:-local}
build: ../webmails/roundcube
rainloop:
image: ${DOCKER_ORG:-mailu}/rainloop:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/rainloop:${MAILU_VERSION:-local}
build: ../webmails/rainloop
fetchmail:
image: ${DOCKER_ORG:-mailu}/fetchmail:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/fetchmail:${MAILU_VERSION:-local}
build: ../services/fetchmail
none:
image: ${DOCKER_ORG:-mailu}/none:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/none:${MAILU_VERSION:-local}
build: ../core/none
docs:
image: ${DOCKER_ORG:-mailu}/docs:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/docs:${MAILU_VERSION:-local}
build: ../docs
setup:
image: ${DOCKER_ORG:-mailu}/setup:${VERSION:-local}
image: ${DOCKER_ORG:-mailu}/setup:${MAILU_VERSION:-local}
build: ../setup

Loading…
Cancel
Save