-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 1.01 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
version: "3"
services:
next-boilerplate:
container_name: next-boilerplate
build:
context: .
dockerfile: ./Dockerfile
env_file:
- .env
environment:
POSTGRES_ADDR: postgres
POSTGRES_DATABASE: next-boilerplate-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?schema=public
depends_on:
postgres:
condition: service_healthy
volumes:
- .:/app/neo-siakad
restart: always
ports:
- 3000:3000
postgres:
image: postgres:15
restart: always
ports:
- 5436:5432
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "midshiftDB"]
interval: 5s
timeout: 10s
retries: 5
volumes:
pgdata: {}