-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
59 lines (55 loc) · 1.19 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: mindset-tkc-api
restart: always
ports:
- '8080:3333'
depends_on:
- postgres
env_file:
- .env
environment:
PORT: ${PORT}
HOST: ${HOST}
NODE_ENV: ${NODE_ENV}
APP_KEY: ${APP_KEY}
DB_CONNECTION: ${DB_CONNECTION}
PG_HOST: postgres
PG_PORT: ${PG_PORT}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
PG_DB_NAME: ${PG_DB_NAME}
PG_DEBUG: ${PG_DEBUG}
networks:
- app-network
postgres:
image: postgres:latest
container_name: mindset-tkc-postgres
healthcheck:
test: ['CMD', 'pg_isready', '-q', '-d', 'postgres', '-U', 'postgres']
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- '5432:5432'
expose:
- 5432
volumes:
- database:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
database: