Files
BitGet_API/docker-compose.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2026-04-20 20:27:42 +09:00
# =============================================================================
# Bitget_Server — docker-compose.yml
#
# 배포:
# 1) appsettings.Production.json 을 이 파일과 같은 디렉토리에 두고
# Bitget.ApiKeys 의 AccessKey/SecretKey/PassphraseKey 를 실제 값으로 교체
# 2) docker compose up -d --build
#
# 볼륨 매핑:
# ./data → /app/data (BaseSettings JSON 영속화)
# ./logs → /app/logs (Serilog 일자 롤링 로그)
# ./appsettings.Production.json → /app/appsettings.Production.json (시크릿 분리)
# =============================================================================
services:
bitget-server:
build:
context: .
dockerfile: Bitget_Server/Dockerfile
image: bitget-server:latest
container_name: bitget-server
restart: unless-stopped
ports:
- "5000:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=5000
- TZ=Asia/Seoul
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./appsettings.Production.json:/app/appsettings.Production.json:ro
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:5000/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# 운영 안정성: OOM / 재귀 장애 시에도 반복 재기동 허용
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"