-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.05 KB
/
docker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.05 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: "3.8"
services:
mongo:
image: mongo:latest
container_name: journal-container
expose:
- "${MONGO_PORT}"
environment:
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/mongo_admin_pwd
deploy:
labels:
example.label: "This is a pointless label"
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 120s
resources:
limits:
cpus: "0.75"
memory: 175M
reservations:
cpus: "0.25"
memory: 75M
secrets:
- mongo_admin_pwd
healthcheck:
test: ["CMD-SHELL", 'mongosh --eval "db.adminCommand(''ping'').ok"']
interval: 10s
timeout: 5s
retries: 3
env_file: .mongo.env
networks:
journal-network:
aliases:
- "${MONGO_HOSTNAME}"
logging:
driver: "local"
options:
max-size: "10m"
max-file: "5"
journal-backend:
image: journal-image-backend
labels:
cool.example: "some meta information about our container"
depends_on:
mongo:
condition: service_healthy
build:
context: ./journal-backend
dockerfile: Dockerfile
environment:
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/mongo_admin_pwd
secrets:
- mongo_admin_pwd
env_file:
- .mongo.env
- .env
logging:
driver: "local"
options:
max-size: "10m"
max-file: "5"
networks:
- journal-network
journal-frontend:
image: journal-image-frontend
labels:
cool.example: "some meta information about our container"
depends_on:
- journal-backend
build:
context: ./journal-frontend
dockerfile: Dockerfile
ports:
- "8083:8083"
env_file:
- .env
logging:
driver: "local"
options:
max-size: "10m"
max-file: "5"
networks:
- journal-network
secrets:
mongo_admin_pwd:
file: ./secrets.folder/mongo_admin_pwd.txt
networks:
journal-network:
name: team3-network
external: true