-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (50 loc) · 1.31 KB
/
docker-compose.yml
File metadata and controls
55 lines (50 loc) · 1.31 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
version: '3.11'
services:
mongodb:
image: mongo:latest
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: medical_user
MONGO_INITDB_ROOT_PASSWORD: securepassword
MONGO_INITDB_DATABASE: medical_db
volumes:
- mongodb_data:/data/db
- ./mong_init.js:/docker-entrypoint-initdb.d/mong_init.js
networks:
- app-network
mongo-express:
image: mongo-express
container_name: mongo_express
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: medical_user
ME_CONFIG_MONGODB_ADMINPASSWORD: securepassword
ME_CONFIG_MONGODB_SERVER: mongodb
MONGO_URL: mongodb://medical_user:securepassword@mongodb:27017 # Updated password
depends_on:
- mongodb
networks:
- app-network
streamlit:
build:
context: ./streamlit # Use Dockerfile in streamlit folder
dockerfile: Dockerfile
container_name: streamlit
ports:
- "9000:9000"
volumes:
- ./streamlit:/app
- static_volume:/app/static # Ensure static volume is in /app/static
depends_on:
- mongodb
networks:
- app-network
volumes:
mongodb_data:
static_volume: # Now this maps to /app/static inside the container
networks:
app-network:
driver: bridge