Make docker-compose.yml for setup and docs development friendly

This enables easy local running.
Actual deployment files are moved to github.com/mailu/infra.
master
Tim Möhlmann 6 years ago
parent 6dea8b422a
commit 1975534125
No known key found for this signature in database
GPG Key ID: 8677988D8072E8DE

@ -1,28 +1,10 @@
# This file is used to test the mailu/docs website
# Deployment files can be found on github.com/mailu/infra
version: '3'
services:
docs_master:
image: mailu/docs:master
networks:
- web
labels:
- traefik.enable=true
- traefik.port=80
- traefik.main.frontend.rule=Host:${ADDRESS};PathPrefix:/master/
docs_15:
image: mailu/docs:1.5
networks:
- web
labels:
- traefik.enable=true
- traefik.port=80
- traefik.root.frontend.redirect.regex=.*
- traefik.root.frontend.redirect.replacement=/1.5/
- traefik.root.frontend.rule=Host:${ADDRESS};PathPrefix:/
- traefik.main.frontend.rule=Host:${ADDRESS};PathPrefix:/1.5/
networks:
web:
external: true
docs:
image: ${DOCKER_ORG:-mailu}/docs:${MAILU_VERSION:-master}
ports:
- 127.0.0.1:8000:80

@ -1,50 +1,16 @@
# This file is used to run the mailu/setup utility
# This file is used to test the mailu/setup utility
# Deployment files can be found on github.com/mailu/infra
version: '3.6'
services:
redis:
image: redis:alpine
networks:
- default
setup_master:
image: mailu/setup:master
networks:
- web
- default
setup:
image: ${DOCKER_ORG:-mailu}/setup:${MAILU_VERSION:-master}
env_file: .env
environment:
this_version: "master"
labels:
- traefik.enable=true
- traefik.port=80
- traefik.docker.network=web
- traefik.main.frontend.rule=Host:${ADDRESS};PathPrefix:/master/
depends_on:
- redis
setup_release:
image: mailu/setup:${RELEASE}
networks:
- web
- default
env_file: .env
environment:
this_version: ${RELEASE}
labels:
- traefik.enable=true
- traefik.port=80
- traefik.docker.network=web
- traefik.root.frontend.redirect.regex=.*
- traefik.root.frontend.redirect.replacement=/${RELEASE}/
- traefik.root.frontend.rule=Host:${ADDRESS};PathPrefix:/
- traefik.main.frontend.rule=Host:${ADDRESS};PathPrefix:/${RELEASE}/
depends_on:
- redis
networks:
web:
external: true
default:
external: false
ports:
- 127.0.0.1:8001:80

@ -11,7 +11,7 @@ import ipaddress
import hashlib
version = os.getenv("this_version")
version = os.getenv("this_version", "master")
static_url_path = "/" + version + "/static"
app = flask.Flask(__name__, static_url_path=static_url_path)
flask_bootstrap.Bootstrap(app)

Loading…
Cancel
Save