This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
strapi/compose.yml

75 lines
2.2 KiB
YAML

version: '3.8'
services:
app:
depends_on:
- db
image: strapi/strapi:3.6.5
volumes:
- strapi:/srv/app
secrets:
- db_root_password
configs:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
#entrypoint: ['tail', '-f', '/dev/null']
entrypoint: /docker-entrypoint.sh
networks:
- internal
- proxy
environment:
DATABASE_CLIENT: mongo
DATABASE_HOST: db
DATABASE_PORT: '27017'
DATABASE_NAME: strapi
DATABASE_USERNAME: root
DATABASE_PASSWORD_FILE: /run/secrets/db_root_password
PROXY_PORT: 443
PROXY_HOST: ${DOMAIN}
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=1337"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "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}"
- coop-cloud.${STACK_NAME}.app.version=3.6.5-e0be3516
db:
image: mongo:3.7
volumes:
- mongo:/data/db
secrets:
- db_root_password
environment:
MONGO_INITDB_DATABASE: strapi
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
networks:
- internal
labels:
- "traefik.enable=false"
deploy:
labels: ['coop-cloud.${STACK_NAME}.db.version=3.7-736eec20']
volumes:
strapi:
mongo:
secrets:
db_root_password:
external: true
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
networks:
proxy:
external: true
internal:
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang