-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (82 loc) · 1.73 KB
/
docker-compose.yml
File metadata and controls
86 lines (82 loc) · 1.73 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
services:
# MongoDB service
mongo:
image: mongo:latest
container_name: github-migrations-mongo
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
networks:
- app-network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
# Backend API service
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: github-migrations-server
ports:
- "4000:4000"
environment:
- NODE_ENV=development
- MONGO_URI=mongodb://mongo:27017/github-migrations
- PORT=4000
- GITHUB_TOKEN=${GITHUB_TOKEN}
- GITHUB_ENTERPRISE_NAME=${GITHUB_ENTERPRISE_NAME}
depends_on:
- mongo
volumes:
- ./server:/app
- /app/node_modules
networks:
- app-network
env_file:
- .env
command: npm run dev
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
# Frontend client service
client:
build:
context: ./client
dockerfile: Dockerfile
container_name: github-migrations-client
ports:
- "3001:3000"
environment:
- NODE_ENV=development
- VITE_GITHUB_TOKEN=${GITHUB_TOKEN}
- VITE_GITHUB_ENTERPRISE_NAME=${GITHUB_ENTERPRISE_NAME}
depends_on:
- server
volumes:
- ./client:/app
- /app/node_modules
networks:
- app-network
env_file:
- .env
command: npm run dev
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
# Define networks
networks:
app-network:
driver: bridge
# Define volumes
volumes:
mongodb_data: