69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
networks:
|
|
traefik:
|
|
external: true
|
|
default:
|
|
|
|
services:
|
|
easy-appointments:
|
|
image: git.nixc.us/colin/easy-appointments:staging
|
|
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://staging.cal.colinknapp.com"
|
|
DEBUG_MODE: "FALSE"
|
|
DB_HOST: "mariadb"
|
|
DB_NAME: "easyappointments"
|
|
DB_USERNAME: "root"
|
|
DB_PASSWORD: "secret"
|
|
networks:
|
|
- traefik
|
|
- default
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.staging_easy-appointments.rule=Host(`staging.cal.colinknapp.com`)
|
|
- traefik.http.routers.staging_easy-appointments.entrypoints=websecure
|
|
- traefik.http.routers.staging_easy-appointments.tls=true
|
|
- traefik.http.routers.staging_easy-appointments.tls.certresolver=letsencryptresolver
|
|
- traefik.http.services.staging_easy-appointments.loadbalancer.server.port=80
|
|
|
|
mariadb:
|
|
image: git.nixc.us/colin/easy-appointments:staging-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
|
|
|
|
volumes:
|
|
mariadb_data:
|