-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (82 loc) · 2.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (82 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
# ── Backend API (REST + SignalR + TradingBot Workers) ───────────────
api:
build:
context: .
dockerfile: NetTrader.Api/Dockerfile
restart: unless-stopped
env_file:
- ./.env
networks:
- nettrader
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5000
# Полная строка подключения к внешнему PostgreSQL (один секрет)
ConnectionStrings__DbConnectionString: ${DBCONNECTIONSTRING}
Jwt__Secret: ${JWT_SECRET}
Jwt__Issuer: ${JWT_ISSUER:-NetTrader.Api}
Jwt__Audience: ${JWT_AUDIENCE:-NetTrader.Frontend}
Auth__AdminUsername: ${ADMIN_USERNAME}
Auth__AdminPasswordHash: ${ADMIN_PASSWORD_HASH}
Cors__AllowedOrigins__0: ${FRONTEND_URL:-http://localhost:3000}
Binance__ApiKey: ${BINANCE_API_KEY}
Binance__ApiSecret: ${BINANCE_API_SECRET}
AiApi__ApiKey: ${GEMINI_API_KEY}
Telegram__BotToken: ${TELEGRAM_BOT_TOKEN}
Telegram__ChatId: ${TELEGRAM_CHAT_ID}
Encryption__Key: ${ENCRYPTION_KEY}
Stripe__SecretKey: ${STRIPE_SECRET_KEY:-}
Stripe__WebhookSecret: ${STRIPE_WEBHOOK_SECRET:-}
GoogleAuth__ClientId: ${GOOGLE_CLIENT_ID:-}
Smtp__Host: ${SMTP__HOST:-}
Smtp__Port: ${SMTP__PORT:-587}
Smtp__Username: ${SMTP__USERNAME:-}
Smtp__Password: ${SMTP__PASSWORD:-}
Smtp__FromEmail: ${SMTP__FROMEMAIL:-noreply@example.com}
expose:
- "5000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
mem_limit: 768m
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# ── Caddy Reverse Proxy (SSL termination) ───────────────────────────
# NOTE: Frontend runs on Vercel — only the API is proxied here
caddy:
image: caddy:2.8-alpine
restart: unless-stopped
depends_on:
api:
condition: service_healthy
networks:
- nettrader
environment:
DOMAIN_NAME: ${API_DOMAIN:-localhost}
ACME_EMAIL: ${LETSENCRYPT_EMAIL:-admin@example.com}
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
mem_limit: 128m
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
caddy_data:
caddy_config:
networks:
nettrader:
driver: bridge