selfoss/compose.yml

93 lines
2.6 KiB
YAML
Raw Normal View History

2020-09-23 11:35:54 +00:00
---
version: '3.8'
2020-09-22 15:48:14 +00:00
services:
2020-09-23 11:35:54 +00:00
postgres:
image: "postgres:9.6.5"
volumes:
- "postgres:/var/lib/postgresql/data"
networks:
- internal
environment:
POSTGRES_USER: selfoss
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
POSTGRES_DB: selfoss
secrets:
- db_password
2020-09-22 15:48:14 +00:00
selfoss:
image: akito13/selfoss
volumes:
- 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
2020-09-23 11:35:54 +00:00
update_config:
failure_action: rollback
order: start-first
environment:
- SELFOSS_USERNAME
- SELFOSS_PASSWORD
2020-09-23 11:53:34 +00:00
# TODO 3wc: call PHP password_hash() on this before loading it, see
# https://git.autonomic.zone/compose-stacks/selfoss/issues/3
2020-09-23 11:35:54 +00:00
#- SELFOSS_PASSWORD_FILE=/run/secrets/selfoss_password
- SELFOSS_DB_TYPE
- SELFOSS_LOGGER_LEVEL
- SELFOSS_DB_HOST="postgres"
- SELFOSS_DB_NAME="selfoss"
- SELFOSS_DB_USERNAME="selfoss"
- SELFOSS_DB_PASSWORD_FILE=/run/secrets/db_password
secrets:
- db_password
2020-09-23 11:53:34 +00:00
# TODO 3wc: see above note about issue #3
2020-09-23 11:35:54 +00:00
#- selfoss_password
entrypoint: /docker-entrypoint.sh
configs:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
networks:
- proxy
- internal
depends_on:
- postgres
2020-09-23 11:53:34 +00:00
# TODO 3wc: not working currently, complains about YAML syntax error
2020-09-23 11:35:54 +00:00
#healthcheck:
# test: ["CMD", "wget", "-f" "http://localhost:8888"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
2020-09-22 15:48:14 +00:00
networks:
proxy:
external: true
2020-09-23 11:35:54 +00:00
internal:
2020-09-22 15:48:14 +00:00
volumes:
selfoss:
2020-09-23 11:35:54 +00:00
postgres:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
2020-09-23 11:53:34 +00:00
# TODO 3wc: see above note about issue #3
2020-09-23 11:35:54 +00:00
#selfoss_password:
# external: true
# name: ${STACK_NAME}_selfoss_password_${SELFOSS_PASSWORD_VERSION}
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang