-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (74 loc) · 1.83 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
70
71
72
73
74
version: "3.9"
services:
db:
image: postgres:alpine
restart: always
container_name: reog-apps-db
environment:
POSTGRES_USER: 'erikrios'
POSTGRES_PASSWORD: 'erikrios'
POSTGRES_DB: 'reog_apps_db'
ports:
- '5432:5432'
expose:
- '5432'
volumes:
- reog-apps-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
logging:
image: mongo:5.0.8
restart: always
container_name: mongo-logging
environment:
MONGO_INITDB_ROOT_USERNAME: erikrios
MONGO_INITDB_ROOT_PASSWORD: erikrios
MONGO_INITDB_DATABASE: logging
ports:
- '27017:27017'
expose:
- '27017'
volumes:
- reog-apps-logging-volume:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
api:
image: "erikrios/reog-apps-apis:1.0"
restart: always
container_name: reog-apps-apis
environment:
ENV: 'development'
PORT: '3000'
DB_PORT: '5432'
DB_HOST: 'reog-apps-db'
DB_USER: 'erikrios'
DB_PASSWORD: 'erikrios'
DB_NAME: 'reog_apps_db'
JWT_SECRET: 'ErikRioSetiawan'
PONOROGO_ADMINISTRATIVE_AREA_BASE_URL: 'https://ponorogo-api.herokuapp.com/api/v1'
ADMIN_USERNAME: 'admin'
ADMIN_NAME: 'administrator'
ADMIN_PASSWORD: 'erikrios'
MONGO_USERNAME: 'erikrios'
MONGO_PASSWORD: 'erikrios'
MONGO_HOST: 'mongo-logging'
MONGO_PORT: '27017'
ports:
- '3000:3000'
expose:
- '3000'
depends_on:
db:
condition: service_healthy
logging:
condition: service_healthy
volumes:
reog-apps-db-volume:
reog-apps-logging-volume: