forked from Nixius/template
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
networks:
|
|
traefik:
|
|
external: true
|
|
default:
|
|
|
|
services:
|
|
easy-appointments:
|
|
image: git.nixc.us/colin/easy-appointments:production
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == macmini14
|
|
restart_policy:
|
|
condition: on-failure
|
|
max_attempts: 3
|
|
update_config:
|
|
parallelism: 1
|
|
delay: 10s
|
|
order: start-first
|
|
rollback_config:
|
|
parallelism: 1
|
|
delay: 10s
|
|
order: stop-first
|
|
environment:
|
|
BASE_URL: "https://cal.colinknapp.com"
|
|
DEBUG_MODE: "TRUE"
|
|
DB_HOST: "mariadb"
|
|
DB_NAME: "easyappointments"
|
|
DB_USERNAME: "root"
|
|
DB_PASSWORD: "secret"
|
|
networks:
|
|
- traefik
|
|
- default
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.production_easy-appointments.rule=Host(`cal.colinknapp.com`)
|
|
- traefik.http.routers.production_easy-appointments.entrypoints=websecure
|
|
- traefik.http.routers.production_easy-appointments.tls=true
|
|
- traefik.http.routers.production_easy-appointments.tls.certresolver=letsencryptresolver
|
|
- traefik.http.services.production_easy-appointments.loadbalancer.server.port=80
|
|
# - traefik.http.services.production_easy-appointments.loadbalancer.healthcheck.path=/health
|
|
# - traefik.http.services.production_easy-appointments.loadbalancer.healthcheck.interval=30s
|
|
# - traefik.http.services.production_easy-appointments.loadbalancer.healthcheck.timeout=5s
|
|
- traefik.http.routers.production_easy-appointments.middlewares=secure-headers
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
mariadb:
|
|
image: git.nixc.us/colin/easy-appointments:production-mariadb
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == macmini14
|
|
restart_policy:
|
|
condition: on-failure
|
|
max_attempts: 3
|
|
environment:
|
|
- MARIADB_ROOT_PASSWORD=secret
|
|
- MARIADB_DATABASE=easyappointments
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- mariadb_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MARIADB_ROOT_PASSWORD"]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
timeout: 5s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
volumes:
|
|
mariadb_data:
|