ferdium-server/docker-compose.yml

88 lines
3.1 KiB
YAML

---
services:
ferdium-server:
image: ferdium/ferdium-server:${FERDIUM_VERSION}
restart: unless-stopped
depends_on:
- mariadb
environment:
- NODE_ENV=${FERDIUM_NODEENV}
- APP_URL=${FERDIUM_URL}
- DB_CONNECTION=${FERDIUM_DATABASE}
- DB_HOST=${FERDIUM_DBHOST}
- DB_PORT=${FERDIUM_DBPORT}
- DB_USER=${MARIADB_USER}
- DB_PASSWORD=${MARIADB_PASSWORD}
- DB_DATABASE=${MARIADB_DATABASE}
- DB_SSL=${FERDIUM_DBSSL}
- MAIL_CONNECTION=${FERDIUM_MAIL}
- SMTP_HOST=${FERDIUM_MAILHOST}
- SMTP_PORT=${FERDIUM_MAILPORT}
- MAIL_SSL=${FERDIUM_MAILSSL}
- MAIL_USERNAME=${FERDIUM_MAILUSER}
- MAIL_PASSWORD=${FERDIUM_MAILPASS}
- MAIL_SENDER=${FERDIUM_MAILSENDER}
- IS_CREATION_ENABLED=${FERDIUM_RECIPESCREATION}
- IS_DASHBOARD_ENABLED=${FERDIUM_DASHBOARD}
- IS_REGISTRATION_ENABLED=${FERDIUM_REGISTRATION}
- CONNECT_WITH_FRANZ=${FERDIUM_FRANZ}
- DATA_DIR=/data
- JWT_USE_PEM=true
labels:
### Section Træfik
- traefik.enable=${TRAEFIK_ENABLED}
- traefik.docker.network=${TRAEFIK_NETWORK}
## HTTP
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
# redirect to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTP_MIDDLEWARES}
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
## HTTPS
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
# configure the exposed service
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTPS_MIDDLEWARES}
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
# enable TLS and its certificate provider
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
# specify a service so a custom port can be used
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
### Section Diun
- diun.enable=${FERDIUM_DIUN_ENABLE}
- diun.watch_repo=${FERDIUM_DIUN_WATCHREPO}
- diun.sort_tags=${FERDIUM_DIUN_SORTALGO}
- diun.include_tags=${FERDIUM_DIUN_INCLUDE}
- diun.exclude_tags=${FERDIUM_DIUN_EXCLUDE}
networks:
- internal
- traefik
volumes:
- ${FERDIUM_DATA}:/data
- ${FERDIUM_RECIPES}:/app/recipes
mariadb:
image: mariadb:${MARIADB_VERSION}
restart: unless-stopped
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MARIADB_USER=${MARIADB_USER}
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
- MARIADB_DATABASE=${MARIADB_DATABASE}
labels:
### Section Diun
- diun.enable=${MARIADB_DIUN_ENABLE}
- diun.watch_repo=${MARIADB_DIUN_WATCHREPO}
- diun.sort_tags=${MARIADB_DIUN_SORTALGO}
- diun.include_tags=${MARIADB_DIUN_INCLUDE}
- diun.exclude_tags=${MARIADB_DIUN_EXCLUDE}
networks:
- internal
volumes:
- ${MARIADB_DATA}:/var/lib/mysql
networks:
internal:
traefik:
external: true
name: ${TRAEFIK_NETWORK}