-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.37 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
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "127.0.0.1:8000:8000"
volumes:
- ./backend:/app
environment:
- DATABASE_URL=mongodb://mongo:27017/${DATABASE_NAME}
- GCP_PROJECT_ID=${GCP_PROJECT_ID}
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-credentials.json
depends_on:
- mongo
networks:
- app-network
mongo:
image: mongo:5.0
container_name: mongo
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongo-data:/data/db
networks:
- app-network
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand('ping').ok"]
interval: 5s
timeout: 3s
retries: 3
start_period: 10s
mongo-express:
image: mongo-express
container_name: mongo-express
ports:
- "127.0.0.1:8081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_BASICAUTH_USERNAME: ${ME_CONFIG_BASICAUTH_USERNAME}
ME_CONFIG_BASICAUTH_PASSWORD: ${ME_CONFIG_BASICAUTH_PASSWORD}
ME_CONFIG_SITE_BASEURL: /
ME_CONFIG_OPTIONS_EDITORTHEME: ambiance
VCAP_APP_HOST: 127.0.0.1
depends_on:
mongo:
condition: service_healthy
networks:
- app-network
restart: unless-stopped
networks:
app-network:
driver: bridge
volumes:
mongo-data: