2026-03-03 00:01:57 +08:00
|
|
|
services:
|
|
|
|
|
polyweather:
|
|
|
|
|
container_name: polyweather_bot
|
2026-05-26 02:25:41 +08:00
|
|
|
cpus: ${POLYWEATHER_BOT_CPUS:-0.75}
|
|
|
|
|
env_file: &id001
|
|
|
|
|
- .env
|
2026-05-25 22:31:42 +08:00
|
|
|
environment:
|
2026-05-26 02:25:41 +08:00
|
|
|
TELEGRAM_AIRPORT_PUSH_INTERVAL_SEC: ${POLYWEATHER_BOT_AIRPORT_PUSH_INTERVAL_SEC:-180}
|
|
|
|
|
TELEGRAM_AIRPORT_PUSH_MAX_WORKERS: ${POLYWEATHER_BOT_AIRPORT_PUSH_MAX_WORKERS:-1}
|
2026-05-18 22:57:00 +08:00
|
|
|
healthcheck:
|
|
|
|
|
interval: 60s
|
|
|
|
|
retries: 3
|
2026-05-26 02:25:41 +08:00
|
|
|
test:
|
|
|
|
|
- CMD
|
|
|
|
|
- python
|
|
|
|
|
- -c
|
|
|
|
|
- import sqlite3; c=sqlite3.connect('/var/lib/polyweather/polyweather.db');
|
|
|
|
|
c.execute('SELECT 1'); c.close()
|
|
|
|
|
timeout: 10s
|
2026-05-26 03:42:48 +08:00
|
|
|
image: ghcr.io/yangyuan-zhen/polyweather-backend:${IMAGE_TAG:-latest}
|
2026-05-26 02:25:41 +08:00
|
|
|
mem_limit: ${POLYWEATHER_BOT_MEM_LIMIT:-768m}
|
|
|
|
|
memswap_limit: ${POLYWEATHER_BOT_MEMSWAP_LIMIT:-1g}
|
|
|
|
|
pids_limit: 256
|
2026-03-03 21:27:57 +08:00
|
|
|
restart: unless-stopped
|
2026-05-26 02:25:41 +08:00
|
|
|
user: ${UID:-1000}:${GID:-1000}
|
2026-03-03 21:27:57 +08:00
|
|
|
volumes:
|
2026-05-26 02:25:41 +08:00
|
|
|
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/var/lib/polyweather
|
|
|
|
|
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/app/data
|
|
|
|
|
- ./bot.log:/app/bot.log
|
2026-05-26 01:04:20 +08:00
|
|
|
polyweather_frontend:
|
|
|
|
|
container_name: polyweather_frontend
|
|
|
|
|
environment:
|
2026-05-26 02:25:41 +08:00
|
|
|
NEXT_PUBLIC_POLYWEATHER_API_BASE_URL: ${NEXT_PUBLIC_POLYWEATHER_API_BASE_URL:-}
|
|
|
|
|
NEXT_PUBLIC_POLYWEATHER_LOCAL_FULL_ACCESS: 'false'
|
|
|
|
|
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL:-https://polyweather.top}
|
|
|
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
|
|
|
|
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
|
|
|
|
POLYWEATHER_API_BASE_URL: ${POLYWEATHER_API_BASE_URL:-http://polyweather_web:8000}
|
|
|
|
|
POLYWEATHER_AUTH_ENABLED: ${POLYWEATHER_AUTH_ENABLED:-true}
|
|
|
|
|
POLYWEATHER_AUTH_REQUIRED: ${POLYWEATHER_AUTH_REQUIRED:-true}
|
2026-05-26 01:04:20 +08:00
|
|
|
healthcheck:
|
|
|
|
|
interval: 30s
|
2026-05-26 02:25:41 +08:00
|
|
|
retries: 3
|
|
|
|
|
test:
|
|
|
|
|
- CMD
|
|
|
|
|
- wget
|
|
|
|
|
- -qO-
|
|
|
|
|
- http://localhost:3000
|
2026-05-26 01:04:20 +08:00
|
|
|
timeout: 5s
|
2026-05-26 03:42:48 +08:00
|
|
|
image: ghcr.io/yangyuan-zhen/polyweather-frontend:${IMAGE_TAG:-latest}
|
2026-05-26 02:25:41 +08:00
|
|
|
ports:
|
|
|
|
|
- 3001:3000
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
polyweather_web:
|
|
|
|
|
command: python web/app.py
|
|
|
|
|
container_name: polyweather_web
|
|
|
|
|
env_file: *id001
|
|
|
|
|
healthcheck:
|
|
|
|
|
interval: 30s
|
2026-05-26 01:04:20 +08:00
|
|
|
retries: 3
|
2026-05-26 02:25:41 +08:00
|
|
|
test:
|
|
|
|
|
- CMD
|
|
|
|
|
- python
|
|
|
|
|
- -c
|
|
|
|
|
- from urllib.request import urlopen; urlopen('http://localhost:8000/healthz')
|
|
|
|
|
timeout: 5s
|
2026-05-26 03:42:48 +08:00
|
|
|
image: ghcr.io/yangyuan-zhen/polyweather-backend:${IMAGE_TAG:-latest}
|
2026-05-26 02:25:41 +08:00
|
|
|
ports:
|
|
|
|
|
- 8000:8000
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
user: ${UID:-1000}:${GID:-1000}
|
|
|
|
|
volumes:
|
|
|
|
|
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/var/lib/polyweather
|
|
|
|
|
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/app/data
|
|
|
|
|
x-polyweather-base:
|
|
|
|
|
env_file: *id001
|
2026-05-26 03:42:48 +08:00
|
|
|
image: ghcr.io/yangyuan-zhen/polyweather-backend:${IMAGE_TAG:-latest}
|