78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: formio/formio:4.6.2
|
|
networks:
|
|
- proxy
|
|
- internal
|
|
environment:
|
|
DEBUG: formio:*
|
|
ROOT_PASSWORD_FILE: "/run/secrets/root_pass"
|
|
secrets:
|
|
- root_pass
|
|
- mongo_pass
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3001"
|
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS}) || HostRegexp(`{subdomain:\\w+}.${WILDCARD_DOMAIN}`)"
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
## Redirect from EXTRA_DOMAINS to DOMAIN
|
|
#- "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}.version=0.1.1+4.6.2"
|
|
configs:
|
|
- source: custom-entrypoint
|
|
target: /custom-entrypoint.sh
|
|
mode: 0777
|
|
entrypoint: /custom-entrypoint.sh
|
|
|
|
mongo:
|
|
image: mongo:8.2.6
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- data:/data/db
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: "root"
|
|
MONGO_INITDB_ROOT_PASSWORD_FILE: "/run/secrets/mongo_pass"
|
|
MONGO_INITDB_DATABASE: formio
|
|
configs:
|
|
- source: mongo-init
|
|
target: /docker-entrypoint-initdb.d/mongo-init.js
|
|
mode: 0777
|
|
secrets:
|
|
- mongo_pass
|
|
|
|
volumes:
|
|
data:
|
|
|
|
configs:
|
|
custom-entrypoint:
|
|
name: custom-entrypoint_${CUSTOM_ENTRYPOINT_VERSION}
|
|
file: ./custom-entrypoint.sh.tmpl
|
|
template_driver: golang
|
|
mongo-init:
|
|
name: mongo-init_${MONGO-INIT_VERSION}
|
|
file: ./mongo-init.js.tmpl
|
|
template_driver: golang
|
|
|
|
networks:
|
|
internal:
|
|
proxy:
|
|
external: true
|
|
|
|
secrets:
|
|
root_pass:
|
|
external: true
|
|
name: ${STACK_NAME}_root_pass_${SECRET_ROOT_PASS_VERSION}
|
|
mongo_pass:
|
|
external: true
|
|
name: ${STACK_NAME}_mongo_pass_${SECRET_MONGO_PASS_VERSION}
|