-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (111 loc) · 2.63 KB
/
docker-compose.yml
File metadata and controls
120 lines (111 loc) · 2.63 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
118
119
120
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: mymodus_postgres
environment:
POSTGRES_DB: mymodus
POSTGRES_USER: mymodus
POSTGRES_PASSWORD: mymodus123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
networks:
- mymodus_network
# Redis Cache
redis:
image: redis:7-alpine
container_name: mymodus_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- mymodus_network
# Backend Service
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mymodus_backend
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgres://mymodus:mymodus123@postgres:5432/mymodus
- REDIS_URL=redis://redis:6379
- JWT_SECRET=your_jwt_secret_here
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ETHEREUM_RPC_URL=http://ethereum:8545
- IPFS_API_URL=http://ipfs:5001
- IPFS_GATEWAY_URL=http://ipfs:8080/ipfs
depends_on:
- postgres
- redis
- ipfs
- ethereum
volumes:
- ./backend:/app
- /app/.dart_tool
networks:
- mymodus_network
# Frontend Service (Web)
frontend_web:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mymodus_frontend_web
ports:
- "3000:3000"
environment:
- API_BASE_URL=http://localhost:8080
depends_on:
- backend
networks:
- mymodus_network
# Bot Service (Python)
bot_service:
build:
context: ./bot_service
dockerfile: Dockerfile
container_name: mymodus_bot_service
environment:
- DATABASE_URL=postgres://mymodus:mymodus123@postgres:5432/mymodus
- REDIS_URL=redis://redis:6379
depends_on:
- postgres
- redis
volumes:
- ./bot_service:/app
networks:
- mymodus_network
# IPFS Node (for Web4 storage)
ipfs:
image: ipfs/kubo:latest
container_name: mymodus_ipfs
ports:
- "4001:4001" # Swarm port
- "5001:5001" # API port
- "8080:8080" # Gateway port
volumes:
- ipfs_data:/data/ipfs
networks:
- mymodus_network
# Ethereum Node (Ganache for development)
ethereum:
image: trufflesuite/ganache-cli:latest
container_name: mymodus_ethereum
ports:
- "8545:8545"
command: ganache-cli --host 0.0.0.0 --port 8545 --accounts 10 --defaultBalanceEther 1000
networks:
- mymodus_network
volumes:
postgres_data:
redis_data:
ipfs_data:
networks:
mymodus_network:
driver: bridge