From 63f0651bd9a531ec8d07a9e98606dfae1b84f542 Mon Sep 17 00:00:00 2001 From: Leopere Date: Wed, 23 Apr 2025 14:24:13 -0400 Subject: [PATCH] FIXUP: Pin services to macmini14 and add logging for better debugging --- stack.production.yml | 22 +++++++++++++++++++--- stack.staging.yml | 6 ++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/stack.production.yml b/stack.production.yml index 7ca6d7b..63730cb 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -8,6 +8,9 @@ services: image: git.nixc.us/colin/easy-appointments:production deploy: replicas: 1 + placement: + constraints: + - node.hostname == macmini14 restart_policy: condition: on-failure max_attempts: 3 @@ -20,8 +23,8 @@ services: delay: 10s order: stop-first environment: - BASE_URL: "https://easy-appointments.colinknapp.com" - DEBUG_MODE: "FALSE" + BASE_URL: "https://cal.colinknapp.com" + DEBUG_MODE: "TRUE" DB_HOST: "mariadb" DB_NAME: "easyappointments" DB_USERNAME: "root" @@ -31,7 +34,7 @@ services: - default labels: - traefik.enable=true - - traefik.http.routers.production_easy-appointments.rule=Host(`easy-appointments.colinknapp.com`) + - 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 @@ -40,11 +43,19 @@ services: # - 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 @@ -61,6 +72,11 @@ services: retries: 5 start_period: 30s timeout: 5s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" volumes: mariadb_data: diff --git a/stack.staging.yml b/stack.staging.yml index 8cdd0bb..6d68fe4 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -8,6 +8,9 @@ services: image: git.nixc.us/colin/easy-appointments:staging deploy: replicas: 1 + placement: + constraints: + - node.hostname == macmini14 restart_policy: condition: on-failure max_attempts: 3 @@ -41,6 +44,9 @@ services: 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