-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (110 loc) · 2.9 KB
/
docker-compose.yml
File metadata and controls
117 lines (110 loc) · 2.9 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3.8'
services:
# SQL Server Express Database
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: cryptobot-db
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=CryptoBot@2024!
- MSSQL_PID=Express
- MSSQL_MEMORY_LIMIT_MB=2048
ports:
- "1433:1433"
volumes:
- sqlserver-data:/var/opt/mssql
networks:
- cryptobot-network
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "sa", "-P", "CryptoBot@2024!", "-Q", "SELECT 1"]
interval: 30s
timeout: 10s
retries: 5
# Redis Cache (optional - for session/cache management)
redis:
image: redis:7-alpine
container_name: cryptobot-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- cryptobot-network
command: redis-server --appendonly yes
# CryptoBot Application
cryptobot:
build:
context: .
dockerfile: Dockerfile
container_name: cryptobot-app
ports:
- "80:80"
- "443:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__DefaultConnection=Server=sqlserver;Database=CryptoBot;User Id=sa;Password=CryptoBot@2024!;
- Redis__ConnectionString=redis:6379
- GDAX__ApiKey=${GDAX_API_KEY}
- GDAX__ApiSecret=${GDAX_API_SECRET}
- GDAX__Passphrase=${GDAX_PASSPHRASE}
depends_on:
sqlserver:
condition: service_healthy
redis:
condition: service_started
networks:
- cryptobot-network
volumes:
- ./logs:/app/logs
- ./config:/app/config
# Development API (for debugging)
cryptobot-api-dev:
build:
context: .
dockerfile: Dockerfile.dev
target: api-dev
container_name: cryptobot-api-dev
ports:
- "5000:5000"
- "5001:5001"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:5000;https://+:5001
- ConnectionStrings__DefaultConnection=Server=sqlserver;Database=CryptoBot;User Id=sa;Password=CryptoBot@2024!;
depends_on:
sqlserver:
condition: service_healthy
networks:
- cryptobot-network
volumes:
- ./CryptoBot.Api:/app
- ./CryptoBot.Model:/src/CryptoBot.Model
- ./CryptoBot.Core:/src/CryptoBot.Core
- ./CryptoBot.ExchangeEngine:/src/CryptoBot.ExchangeEngine
profiles:
- dev
# Angular UI Development
cryptobot-ui-dev:
build:
context: ./CryptoBot.UI
dockerfile: Dockerfile.dev
container_name: cryptobot-ui-dev
ports:
- "3003:3003"
- "49153:49153" # Webpack hot reload
environment:
- NODE_ENV=development
networks:
- cryptobot-network
volumes:
- ./CryptoBot.UI:/app
- /app/node_modules
profiles:
- dev
command: npm run start
networks:
cryptobot-network:
driver: bridge
volumes:
sqlserver-data:
redis-data: