-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
76 lines (73 loc) · 1.79 KB
/
docker-compose.yaml
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
version: '3.4'
services:
# Dependant services
## Database (MongoDB) server
mongodb:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: testtest
volumes:
- data:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongodb:27017/test -u admin -p testtest --authenticationDatabase admin --quiet
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
## Database (MongoDB) GUI
mongo-express:
image: mongo-express
environment:
- ME_CONFIG_OPTIONS_EDITORTHEME=dracula
- ME_CONFIG_BASICAUTH=false
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_MONGODB_AUTH_USERNAME=admin
- ME_CONFIG_MONGODB_AUTH_PASSWORD=testtest
depends_on:
mongodb:
condition: service_healthy
ports:
- 8081:8081
healthcheck:
test: wget --quiet --tries=3 --spider http://mongo-express:8081 || exit 1
interval: 7s
timeout: 5s
retries: 10
start_period: 2s
# EPP API
api:
build:
context: .
target: dev
healthcheck:
test: sh -c 'apk add curl; curl http://localhost:3000/'
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
depends_on:
mongodb:
condition: service_healthy
environment:
REPO_TYPE: MongoDB
REPO_CONNECTION: mongodb:27017
REPO_USERNAME: admin
REPO_PASSWORD: testtest
ports:
- 3000:3000
volumes:
- ./src:/opt/epp/src
# expose API and client via proxy
nginx:
image: nginx:latest
depends_on:
api:
condition: service_healthy
ports:
- 8080:80
volumes:
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf
volumes:
data: {}