-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
47 lines (43 loc) · 1.18 KB
/
docker-compose.yml
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
version: '3.9'
services:
note:
image: ghcr.io/ananya2001-an/note:latest
ports:
- "3000:80" # Expose React app on port 3000
depends_on:
- note-server # Ensure backend is ready before starting the frontend
note-server:
image: ghcr.io/ananya2001-an/note-server:latest
ports:
- "5000:5000" # Expose backend on port 5000
depends_on:
- mongodb # Ensure MongoDB is ready before starting the backend
environment:
MONGODB_URI: mongodb://mongodb:27017
DB_NAME: mydb
DB_USER: root
DB_PASS: password
mongodb:
image: mongo:latest # Use the official MongoDB image
ports:
- "27017:27017" # Expose MongoDB on port 27017
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- mongodb-data:/data/db # Persist MongoDB data
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
depends_on:
- mongodb
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_SERVER: mongodb
volumes:
mongodb-data:
driver: local