-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
executable file
·48 lines (41 loc) · 1.01 KB
/
docker-compose.yaml
File metadata and controls
executable file
·48 lines (41 loc) · 1.01 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
version: '3.1'
services:
springboot:
image: 809948819970.dkr.ecr.ap-south-1.amazonaws.com/spring-boot-mongo:1
restart: always #This Will be Ignored If We Deploy in Docker Swarm
environment:
- MONGO_DB_HOSTNAME=mongo
- MONGO_DB_USERNAME=production
- MONGO_DB_PASSWORD=production@123
ports:
- 8080:8080
working_dir: /opt/app
depends_on:
- mongo
networks:
- springappnetwork
deploy: #This Will be Considered only in Docker Swarm
replicas: 2
update_config:
parallelism: 1
delay: 20s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=production
- MONGO_INITDB_ROOT_PASSWORD=production@123
volumes:
- mongodb:/data/db
restart: always
networks:
- springappnetwork
volumes:
mongodb:
external: true
networks:
springappnetwork:
external: true