- WSL2 Ubuntu에서 'image already exists' 오류 해결 문서 추가 - Linux/macOS용 build.sh 스크립트 추가 (BuildKit 비활성화) - Windows PowerShell용 build.ps1 스크립트 추가 - 빌드 오류 트러블슈팅 가이드 추가 - docker-compose.yml에 빌드 오류 관련 주석 추가 - MODULES.md에 Docker 빌드 오류 해결 섹션 추가
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
# ###################################################################
|
|
# docker-compose.yml - FGTools 서비스 구성
|
|
# ###################################################################
|
|
# 사설 레지스트리: reg.firstgarden.co.kr
|
|
#
|
|
# 사용법:
|
|
# 빌드: docker compose build
|
|
# 푸시: docker compose push
|
|
# 실행: docker compose up -d
|
|
# 중지: docker compose down
|
|
# 로그: docker compose logs -f
|
|
#
|
|
# 빌드 오류 시 (image already exists):
|
|
# - docker compose build --no-cache
|
|
# - docker rmi reg.firstgarden.co.kr/fgtools:latest
|
|
# - DOCKER_BUILDKIT=0 docker compose build (WSL2에서 권장)
|
|
# ###################################################################
|
|
|
|
x-common: &common
|
|
image: reg.firstgarden.co.kr/fgtools:latest
|
|
build:
|
|
context: .
|
|
dockerfile: build/Dockerfile
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- TZ=Asia/Seoul
|
|
- PYTHONIOENCODING=utf-8
|
|
restart: unless-stopped
|
|
networks:
|
|
- fgtools-network
|
|
|
|
services:
|
|
# =================================================================
|
|
# Dashboard API - 대시보드 및 통계 API
|
|
# =================================================================
|
|
dashboard:
|
|
<<: *common
|
|
container_name: fgtools-dashboard
|
|
command: ["dashboard"]
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- FLASK_PORT=5000
|
|
- GUNICORN_WORKERS=2
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./data:/app/data
|
|
- ./conf:/app/conf:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/api/dashboard/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# =================================================================
|
|
# Weather API - 날씨 정보 API
|
|
# =================================================================
|
|
weather-api:
|
|
<<: *common
|
|
container_name: fgtools-weather
|
|
command: ["weather"]
|
|
ports:
|
|
- "5001:5001"
|
|
environment:
|
|
- FLASK_PORT=5001
|
|
- GUNICORN_WORKERS=2
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./data:/app/data
|
|
- ./conf:/app/conf:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5001/api/weather/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# =================================================================
|
|
# Webhook Server - 웹훅 수신 서버 (Notion 등)
|
|
# =================================================================
|
|
webhook:
|
|
<<: *common
|
|
container_name: fgtools-webhook
|
|
command: ["webhook"]
|
|
ports:
|
|
- "5002:5002"
|
|
environment:
|
|
- FLASK_PORT=5002
|
|
- GUNICORN_WORKERS=2
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./data:/app/data
|
|
- ./conf:/app/conf:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5002/webhook/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
networks:
|
|
fgtools-network:
|
|
driver: bridge
|