Skip to content

Commit a7a0d01

Browse files
cmyuiclaude
andcommitted
Fix cron and deploy for bridge networking
- Remove PULL_SECRETS_FROM_VAULT=0 from cron entries (incompatible with bridge networking, services need Vault for DB connection strings) - Add sed fix for default mysqld.cnf bind-address in deploy script (99-akatsuki.cnf sets 0.0.0.0 but mysqld.cnf overrides it) - Deploy cron config to /etc/cron.d/akatsuki on each deploy Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 022054a commit a7a0d01

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ jobs:
2828
2929
# Apply config changes
3030
cp config/mysql/99-akatsuki.cnf /etc/mysql/mysql.conf.d/99-akatsuki.cnf
31+
# Ensure default mysqld.cnf doesn't override our bind-address
32+
sed -i 's/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/' /etc/mysql/mysql.conf.d/mysqld.cnf
3133
cp config/redis/redis.conf /etc/redis/redis.conf
34+
cp config/cron/akatsuki /etc/cron.d/akatsuki
35+
chmod 644 /etc/cron.d/akatsuki
3236
cp config/vault/config.hcl /opt/vault/config.hcl
3337
cp config/nginx/nginx.conf /etc/nginx/nginx.conf
3438
cp config/nginx/sites-enabled/*.conf /etc/nginx/sites-enabled/

config/cron/akatsuki

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ SHELL=/bin/bash
22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
33

44
# new-cron: recalc ranks, fix donor badges, freeze timers, update caches (every 30m)
5-
*/30 * * * * root cd /opt/akatsuki && docker compose run --rm -e PULL_SECRETS_FROM_VAULT=0 -e APP_ENV=production --no-deps new-cron >> /opt/akatsuki/logs/new-cron.log 2>&1
5+
*/30 * * * * root cd /opt/akatsuki && docker compose run --rm --no-deps new-cron >> /opt/akatsuki/logs/new-cron.log 2>&1
66

77
# profile-history: snapshot user stats (daily at 00:00 UTC)
8-
0 0 * * * root cd /opt/akatsuki && docker compose run --rm -e PULL_SECRETS_FROM_VAULT=0 -e APP_ENV=production -e APP_COMPONENT=crawler-cronjob --no-deps profile-history-service >> /opt/akatsuki/logs/profile-history-crawler.log 2>&1
8+
0 0 * * * root cd /opt/akatsuki && docker compose run --rm -e APP_COMPONENT=crawler-cronjob --no-deps profile-history-service >> /opt/akatsuki/logs/profile-history-crawler.log 2>&1
99

1010
# sql-backup: dump all tables to S3 (daily at 04:00 UTC)
1111
0 4 * * * root cd /opt/akatsuki/sql-backup-job && ./backup.sh >> /opt/akatsuki/logs/sql-backup.log 2>&1

0 commit comments

Comments
 (0)