Skip to content

Commit f6a92b5

Browse files
cfsmp3claude
andauthored
fix: healthchecks and add standard port sync server access (#404)
- Fix healthchecks to use wget instead of curl (curl not available in Alpine) - Use 127.0.0.1 instead of localhost (resolves correctly in containers) - Fix syncserver healthcheck to use / instead of /health (no /health endpoint) - Add /taskchampion/ path in nginx for sync server on standard port 443 - Update example.frontend.env to use new /taskchampion/ path Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d64701f commit f6a92b5

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
# env_file:
1313
# - ./frontend/.env
1414
healthcheck:
15-
test: ["CMD", "curl", "-f", "http://localhost:80"]
15+
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:80"]
1616
interval: 30s
1717
timeout: 10s
1818
retries: 3
@@ -30,7 +30,7 @@ services:
3030
env_file:
3131
- ./backend/.env
3232
healthcheck:
33-
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
33+
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8000/health"]
3434
interval: 30s
3535
timeout: 10s
3636
retries: 3
@@ -44,7 +44,8 @@ services:
4444
networks:
4545
- tasknetwork
4646
healthcheck:
47-
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
47+
# Note: taskchampion-sync-server doesn't have a /health endpoint, use root
48+
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/"]
4849
interval: 30s
4950
timeout: 10s
5051
retries: 3

production/example.frontend.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
VITE_BACKEND_URL="https://your-domain.com/"
22
VITE_FRONTEND_URL="https://your-domain.com"
3-
VITE_CONTAINER_ORIGIN="https://your-domain.com:8080/"
3+
# Use standard port 443 with /taskchampion/ path (recommended)
4+
VITE_CONTAINER_ORIGIN="https://your-domain.com/taskchampion/"
5+
# Or use legacy port 8080: VITE_CONTAINER_ORIGIN="https://your-domain.com:8080/"

production/example.nginx.conf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,17 @@ server {
171171
proxy_read_timeout 86400;
172172
}
173173

174+
# Taskchampion sync server on standard port 443
175+
# Users can configure: task config sync.server.url https://your-domain.com/taskchampion/
176+
location /taskchampion/ {
177+
proxy_pass http://127.0.0.1:8081/;
178+
proxy_http_version 1.1;
179+
proxy_set_header Host $host;
180+
proxy_set_header X-Real-IP $remote_addr;
181+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
182+
proxy_set_header X-Forwarded-Proto $scheme;
183+
}
184+
174185
# Frontend (default)
175186
location / {
176187
proxy_pass http://127.0.0.1:3000;
@@ -182,7 +193,7 @@ server {
182193
}
183194
}
184195

185-
# Taskchampion sync server (port 8080 with SSL)
196+
# Taskchampion sync server (port 8080 with SSL) - Legacy support
186197
server {
187198
listen 8080 ssl http2;
188199
listen [::]:8080 ssl http2;

0 commit comments

Comments
 (0)