Rename services, add EXTRA_DOMAINS
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
See compose-stacks/organising#15 & compose-stacks/organising#19
This commit is contained in:
parent
78b1d12c7c
commit
110e990d78
|
@ -1,6 +1,9 @@
|
||||||
export SERVICE=selfoss
|
export SERVICE=selfoss
|
||||||
export DOMAIN=reader.example.com
|
|
||||||
export STACK_NAME=selfoss
|
export STACK_NAME=selfoss
|
||||||
|
|
||||||
|
export DOMAIN=reader.example.com
|
||||||
|
## Domain aliases
|
||||||
|
#export EXTRA_DOMAINS=', `www.wordpress.example.com`'
|
||||||
export LETS_ENCRYPT_ENV=production
|
export LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
# Selfoss options, see https://www.selfoss.aditu.de/#configuration
|
# Selfoss options, see https://www.selfoss.aditu.de/#configuration
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
db:
|
||||||
image: "postgres:9.6.5"
|
image: "postgres:9.6.5"
|
||||||
volumes:
|
volumes:
|
||||||
- "postgres:/var/lib/postgresql/data"
|
- "db:/var/lib/postgresql/data"
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
environment:
|
environment:
|
||||||
|
@ -19,17 +19,17 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- db
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
environment:
|
environment:
|
||||||
- SELFOSS_DB_HOST=postgres
|
- SELFOSS_DB_HOST=db
|
||||||
- SELFOSS_DB_NAME=selfoss
|
- SELFOSS_DB_NAME=selfoss
|
||||||
- SELFOSS_DB_USERNAME=selfoss
|
- SELFOSS_DB_USERNAME=selfoss
|
||||||
- SELFOSS_DB_PASSWORD_FILE=/run/secrets/db_password
|
- SELFOSS_DB_PASSWORD_FILE=/run/secrets/db_password
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres:
|
db:
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
db_password:
|
db_password:
|
||||||
|
|
32
compose.yml
32
compose.yml
|
@ -2,24 +2,10 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
selfoss:
|
app:
|
||||||
image: akito13/selfoss
|
image: akito13/selfoss
|
||||||
volumes:
|
volumes:
|
||||||
- selfoss:/selfoss/data
|
- selfoss:/selfoss/data
|
||||||
deploy:
|
|
||||||
labels:
|
|
||||||
- traefik.enable=true
|
|
||||||
- traefik.docker.network=proxy
|
|
||||||
- traefik.http.routers.${STACK_NAME}-http.rule=Host(`${DOMAIN?Variable not set}`)
|
|
||||||
- traefik.http.routers.${STACK_NAME}-http.entrypoints=web
|
|
||||||
- traefik.http.routers.${STACK_NAME}-https.rule=Host(`${DOMAIN?Variable not set}`)
|
|
||||||
- traefik.http.routers.${STACK_NAME}-https.entrypoints=web-secure
|
|
||||||
- traefik.http.routers.${STACK_NAME}-https.tls=true
|
|
||||||
- traefik.http.routers.${STACK_NAME}-https.tls.certresolver=${LETS_ENCRYPT_ENV}
|
|
||||||
- traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8888
|
|
||||||
update_config:
|
|
||||||
failure_action: rollback
|
|
||||||
order: start-first
|
|
||||||
environment:
|
environment:
|
||||||
- SELFOSS_USERNAME
|
- SELFOSS_USERNAME
|
||||||
- SELFOSS_PASSWORD
|
- SELFOSS_PASSWORD
|
||||||
|
@ -31,19 +17,33 @@ services:
|
||||||
#secrets:
|
#secrets:
|
||||||
# TODO 3wc: see above note about issue #3
|
# TODO 3wc: see above note about issue #3
|
||||||
#- selfoss_password
|
#- selfoss_password
|
||||||
entrypoint: /docker-entrypoint.sh
|
|
||||||
configs:
|
configs:
|
||||||
- source: entrypoint_conf
|
- source: entrypoint_conf
|
||||||
target: /docker-entrypoint.sh
|
target: /docker-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
entrypoint: /docker-entrypoint.sh
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO", "-", "http://localhost:8888"]
|
test: ["CMD", "wget", "-qO", "-", "http://localhost:8888"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
start_period: 1m
|
start_period: 1m
|
||||||
|
deploy:
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
order: start-first
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=proxy"
|
||||||
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8888"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||||
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
|
|
Loading…
Reference in New Issue