forked from muralekarthick/RetailCatalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (61 loc) · 1.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (61 loc) · 1.57 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
61
62
version: '2.2'
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
healthcheck:
test: echo 'db.runCommand({serverStatus:1}).ok' | mongo admin -u root -p Root\!234 --quiet | grep 1
interval: 30s
timeout: 60s
retries: 5
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: Root!234
MONGO_INITDB_DATABASE: root-db
mem_limit: "2048000000"
volumes:
- ./docker-entrypoint-initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
#- mongodb_data:/data/db
networks:
catalog-nw:
aliases:
- mongodb
catalog:
image: catalog:latest
build:
context: .
links:
- mongodb
depends_on:
mongodb:
condition: service_healthy
environment:
MONGODB_USERNAME: catalog
MONGODB_PASSWORD: Catalog!234
MONGODB_HOST: mongodb
MONGODB_PORT: 27017
MONGODB_DATABASE: catalog
LOGSPOUT: ignore
mem_limit: "2048000000"
ports:
- 8080:8080
healthcheck:
test: ["CMD", "curl","-I" ,"-XGET", "http://localhost:8080/actuator/health"]
interval: 60s
timeout: 30s
retries: 15
networks:
catalog-nw:
aliases:
- catalog
#volumes:
#mongodb_data:
## Use the below setting for a persistent data storage. Please craete the necessary container/persistence/mongo in your current directory of docker-compose.yml
#driver: local
#driver_opts:
# type: none
# device: $PWD/container/persistence/mongo
# o: bind
networks:
catalog-nw: