-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
69 lines (66 loc) · 2.12 KB
/
docker-compose.example.yml
File metadata and controls
69 lines (66 loc) · 2.12 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
services:
mongodb:
image: mongo:5
container_name: fintechforge_mongodb
restart: unless-stopped
ports:
- "${MONGO_PORT:-27017}:27017"
command: ["mongod", "--replSet", "rs0"]
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_INITDB_ROOT_USERNAME:-root}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD:-example}"
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --eval \"db.adminCommand({ ping: 1 }).ok\" mongodb:27017/test || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# Node.js backend (backend-node)
backend-node:
build:
context: ./backend-node
dockerfile: Dockerfile
container_name: fintechforge_backend_node
env_file:
- ./backend-node/.env.example
environment:
NODE_ENV: "${BACKEND_NODE_ENV:-development}"
PORT: "${BACKEND_NODE_PORT:-3000}"
MONGO_URL: "${MONGO_URL:-mongodb://mongodb:${MONGO_PORT:-27017}/fintechforge}"
ports:
- "${BACKEND_NODE_PORT:-3000}:${BACKEND_NODE_PORT:-3000}"
depends_on:
mongodb:
condition: service_healthy
# Python backend (backend-python)
backend-python:
build:
context: ./backend-python
dockerfile: Dockerfile
container_name: fintechforge_backend_python
env_file:
- ./backend-python/.env.example
environment:
PYTHON_ENV: "${BACKEND_PYTHON_ENV:-development}"
PORT: "${BACKEND_PYTHON_PORT:-8000}"
MONGO_URL: "${MONGO_URL:-mongodb://mongodb:${MONGO_PORT:-27017}/fintechforge}"
ports:
- "${BACKEND_PYTHON_PORT:-8000}:${BACKEND_PYTHON_PORT:-8000}"
depends_on:
mongodb:
condition: service_healthy
# Frontend (React/Vite)
frontend-react:
build:
context: ./frontend-react
dockerfile: Dockerfile
container_name: fintechforge_frontend
env_file:
- ./frontend-react/.env.example
environment:
REACT_APP_API_URL: "${REACT_APP_API_URL:-http://localhost:${BACKEND_NODE_PORT:-3000}}"
PORT: "${FRONTEND_PORT:-3001}"
ports:
- "${FRONTEND_PORT:-3001}:${FRONTEND_PORT:-3001}"
depends_on:
- backend-node
- backend-python