-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (50 loc) · 1.18 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
version: '3.8'
services:
api:
build:
dockerfile: Dockerfile.dev
command: npm run start
environment:
PGHOST: postgres
PGPORT: ${PGPORT}
PGUSER: ${PGUSER}
PGPASSWORD: ${PGPASSWORD}
PGDATABASE: ${PGDATABASE}
NODE_ENV: development
PORT: ${PORT}
ports:
- '${PORT}:${PORT}'
restart: unless-stopped
volumes:
- .:/usr/app
depends_on:
postgres:
condition: service_healthy
pgAdmin:
image: dpage/pgadmin4:6.14
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_LOGIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_LOGIN_PASSWORD}
ports:
- '${PGADMIN_PORT}:80'
volumes:
- pg-admin-data:/var/lib/pgadmin
postgres:
image: postgres:14.5-alpine3.16
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_PASSWORD: ${PGPASSWORD}
POSTGRES_DB: ${PGDATABASE}
ports:
- '${PGPORT}:${PGPORT}'
healthcheck:
test: pg_isready -U ${PGUSER} -p ${PGPORT} -d ${PGDATABASE}
interval: 1s
timeout: 1s
start_period: 6s
restart: on-failure
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
pg-admin-data:
postgres-data: