-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (45 loc) · 1003 Bytes
/
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
version: "3.9"
services:
db:
image: postgres:alpine
restart: always
container_name: moot-db
environment:
POSTGRES_USER: 'erikrios'
POSTGRES_PASSWORD: 'erikrios'
POSTGRES_DB: 'moot_db'
ports:
- '5432:5432'
expose:
- '5432'
volumes:
- moot-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
api:
image: "erikrios/moot:latest"
restart: always
container_name: moot-api
environment:
ENV: 'production'
PORT: '3000'
DB_PORT: '5432'
DB_HOST: 'moot-db'
DB_USER: 'erikrios'
DB_PASSWORD: 'erikrios'
DB_NAME: 'moot_db'
DB_SSL: 'off'
JWT_SECRET: 'ErikRioSetiawan'
API_KEY: '2ry3HBOBLi1YkCma49pdnH3RpMguwgNZ1bvU2eqCOzZg2y0g2j'
ports:
- '3000:3000'
expose:
- '3000'
depends_on:
db:
condition: service_healthy
volumes:
moot-db-volume: