-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (57 loc) · 1.22 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
version: "3.8"
services:
postgres:
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=admin
ports:
- "5432:5432"
volumes:
- ./sql/1_create_tables.sql:/docker-entrypoint-initdb.d/1_create_tables.sql
- ./sql/2_create_functions.sql:/docker-entrypoint-initdb.d/2_create_functions.sql
- postgres_data:/var/lib/postgresql/data/
nginx:
restart: always
build:
context: ./nginx
ports:
- "80:80"
depends_on:
- postgres
api:
environment:
PORT: 3000
LOG_DIR: "../logs"
DB_HOST: postgres
DB_PORT: 5432
DB_USER: admin
DB_PASSWORD: admin
DB_DATABASE: admin
build:
context: ./
dockerfile: Dockerfile
depends_on:
- postgres
ports:
- "3000:3000"
api2:
environment:
PORT: 3001
LOG_DIR: "../logs"
DB_HOST: postgres
DB_PORT: 5432
DB_USER: admin
DB_PASSWORD: admin
DB_DATABASE: admin
build:
context: ./
dockerfile: Dockerfile
depends_on:
- postgres
ports:
- "3001:3001"
volumes:
postgres_data: