Files
web-at-transit/docker-compose.yml
itmeadmin 138a3d15d8 พอร์ต UI จาก web-at-transit-mock เข้า Next.js + data sync เข้า Postgres/SeaweedFS
- 8 หน้า (home/stops/routes/stop/check/blog/about/credits) แปลง partials → React component ตรง mock
- ตรรกะพอร์ตเป็น src/lib/ui/*.ts (mount()) + runtime/PageRuntime
- CSS: base + pages/*.css import ต่อ route (คงลำดับ cascade ของ mock)
- asset/content: public/{image,resource/data,content,locales,vendor}
- แก้ path รูปไทล์พาร์ทเนอร์ (.image → /image) + fallback absolute
- ลบ UI เดิมที่ไม่ตรง mock (expanded/stops details/old components/globals.css)
- script/sync_data_to_postgres.mjs + sync_images_to_storage.mjs (dry-run/--apply, backup)
- docs/UI-PORT.md + DESIGN.md + README
2026-10-23 15:50:00 +07:00

58 lines
1.7 KiB
YAML

name: at-transit
networks:
internal-network:
external: true
services:
backend:
build:
context: ./backend
image: at-transit-backend:latest
container_name: at-transit-backend
restart: unless-stopped
networks:
- internal-network
extra_hosts:
- "host-gateway:host-gateway"
env_file:
- .env
environment:
# SeaweedFS + Postgres มาจาก stack ของ D:\Git\core_management
# (compose.storage.yaml / compose.internal.db.yaml) ผ่าน internal-network
STORAGE_URL: ${STORAGE_URL:-http://seaweed-filer:8888}
STORAGE_BUCKET: transit
STORAGE_PUBLIC_BASE: /files
BIND_ADDR: 0.0.0.0:${BACKEND_PORT}
RUST_LOG: info,sqlx=warn,tower_http=info
CORS_ALLOW_ORIGINS: "*"
SEED_ASSETS_DIR: /seed-assets
volumes:
- ./storage/seed-assets:/seed-assets:ro
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
frontend:
build:
context: ./frontend
args:
NEXT_PUBLIC_API_BASE: /api
NEXT_PUBLIC_FILES_BASE: /files
BACKEND_INTERNAL_URL: http://at-transit-backend:${BACKEND_PORT}
INTERNAL_API_BASE: http://at-transit-backend:${BACKEND_PORT}/api
image: at-transit-frontend:latest
container_name: at-transit-frontend
restart: unless-stopped
networks:
- internal-network
extra_hosts:
- "host-gateway:host-gateway"
environment:
NEXT_PUBLIC_API_BASE: /api
NEXT_PUBLIC_FILES_BASE: /files
HOSTNAME: 0.0.0.0
INTERNAL_API_BASE: http://at-transit-backend:${BACKEND_PORT}/api
BACKEND_INTERNAL_URL: http://at-transit-backend:${BACKEND_PORT}
PORT: 3000
ports:
- "${FRONTEND_PORT}:3000"