-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (58 loc) · 1.28 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: base-acl-api
restart: always
ports:
- '3333:3333'
depends_on:
- postgres
- redis
env_file:
- .env
environment:
TZ: ${TZ}
PORT: ${PORT}
HOST: ${HOST}
LOG_LEVEL: ${LOG_LEVEL}
APP_KEY: ${APP_KEY}
NODE_ENV: ${NODE_ENV}
ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET}
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}
DB_HOST: postgres
DB_PORT: ${PG_PORT}
DB_USER: ${PG_USER}
DB_PASSWORD: ${PG_PASSWORD}
DB_DATABASE: ${PG_DB_NAME}
networks:
- app-network
postgres:
image: postgres:latest
container_name: base-acl-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: