-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 1.06 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
services:
mongo:
image: mongo:latest
container_name: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: game_store
volumes:
- game_store_volume:/data/db
- ./mongo-init:/docker-entrypoint-initdb.d:ro
restart: unless-stopped
networks:
- game_store_network
healthcheck:
test: ["CMD", "mongosh", "--quiet", "mongodb://mongo:27017", "--eval", "db.adminCommand({ping: 1})"]
interval: 10s
timeout: 5s
retries: 5
webapi:
build:
context: .
dockerfile: Dockerfile
image: game_store_webapi:dev
container_name: game_store_webapi
ports:
- "7031:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- MongoDbSettings__ConnectionString=mongodb://mongo:27017
- MongoDbSettings__DatabaseName=game_store
depends_on:
mongo:
condition: service_healthy
networks:
- game_store_network
networks:
game_store_network:
external: false
volumes:
game_store_volume: