-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (64 loc) · 1.34 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3.8'
services:
db:
image: mysql
container_name: db
env_file: .env
environment:
- MYSQL_PASSWORD=$DB_PASS
- MYSQL_USER=$DB_USER
volumes:
- mysql-data:/var/lib/mysql
ports:
- 5000:3306
restart: unless-stopped
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 5s
timeout: 2s
retries: 10
networks:
- inventory-management-network
mongodb:
image: mongo
container_name: mongodb
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=MONGO_USER
- MONGO_INITDB_ROOT_PASSWORD=MONGO_PASSWORD
- MONGO_URI=CONNECTION_STRING
volumes:
- mongo-data:/var/lib/mongo
ports:
- 27017:27017
restart: unless-stopped
networks:
- inventory-management-network
myapp:
build:
context: .
dockerfile: Dockerfile
image: inventory-management
container_name: app
env_file: .env
environment:
- DB_USER
- DB_PASS
- DB_HOST
- CONNECTION_STRING
- PASSWORD
- EMAIL
ports:
- 8000:8080
restart: unless-stopped
networks:
- inventory-management-network
depends_on:
db:
condition: service_healthy
networks:
inventory-management-network:
driver: bridge
volumes:
mysql-data:
mongo-data: