-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (74 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
77 lines (74 loc) · 2.32 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
# Crypto AI Agent - Uses Shared Database Server
# This service uses the shared database-server microservice (db-server-postgres, db-server-redis)
# like all other applications in the ecosystem.
#
# Prerequisites:
# 1. Ensure database-server is running: cd ../database-server && ./scripts/start.sh
# 2. Ensure database 'crypto_ai_agent' exists in db-server-postgres
# 3. Ensure nginx-network exists: docker network create nginx-network (if not exists)
#
# For production deployments, use:
# - docker-compose.blue.yml (blue deployment)
# - docker-compose.green.yml (green deployment)
services:
backend:
build:
context: ./backend
container_name: crypto-ai-backend
env_file:
- .env
ports:
- ${API_PORT:-3102}:${API_PORT:-3102}
volumes:
- /srv/storagebox/statex/docker-volumes/crypto-ai-agent/logs:/app/logs
environment:
# Uses shared database-server via nginx-network
- DATABASE_URL=${DATABASE_URL:-postgresql+psycopg://${DB_USER:-dbadmin}:${DB_PASSWORD}@db-server-postgres:5432/${DB_NAME:-crypto_ai_agent}}
- API_PORT=${API_PORT:-3102}
- REDIS_URL=${REDIS_URL:-redis://db-server-redis:6379/0}
- LOGGING_SERVICE_URL=${LOGGING_SERVICE_URL:-http://logging-microservice:${LOGGING_SERVICE_PORT:-3367}}
- AUTH_SERVICE_URL=${AUTH_SERVICE_URL:-http://auth-microservice:${AUTH_SERVICE_PORT:-3370}}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${API_PORT:-3102}/docs"]
interval: 10s
timeout: 5s
retries: 2
deploy:
resources:
limits:
memory: 300M
reservations:
memory: 100M
networks:
- nginx-network
frontend:
build:
context: ./frontend
args:
DEBUG: ${DEBUG:-false}
container_name: crypto-ai-frontend
env_file:
- .env
ports:
- ${FRONTEND_PORT:-3100}:${FRONTEND_PORT:-3100}
depends_on:
- backend
environment:
- PORT=${FRONTEND_PORT:-3100}
- NEXT_PUBLIC_DEBUG=${DEBUG:-false}
healthcheck:
test: ["CMD", "curl", "-f", "-L", "http://localhost:${FRONTEND_PORT:-3100}"]
interval: 10s
timeout: 5s
retries: 2
deploy:
resources:
limits:
memory: 300M
reservations:
memory: 100M
networks:
- nginx-network
networks:
nginx-network:
external: true