-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
49 lines (48 loc) · 1.14 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
version: '3.4'
services:
nginx:
image: nginx:latest@sha256:d85914d547a6c92faa39ce7058bd7529baacab7e0cd4255442b04577c4d1f424
ports:
- 8080:8080
restart: always
volumes:
- ./server/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./server/nginx/nginx.api.conf:/etc/nginx/conf.d/api.conf
depends_on:
- api
api:
build:
context: .
dockerfile: default.Dockerfile
container_name: api
environment:
- NODE_ENV=development
- APP_PORT=3000
- PG_USER_NAME=pguser
- PG_PASS=pguser
- PG_DB=db
- PG_SCHEMA=public
- PG_HOST=postgres
- PG_PORT=5432
ports:
- 9229:9229
- 3000:3000
volumes:
- ./src:/usr/src/app/src
depends_on:
- postgres
restart: always
postgres:
image: postgres:latest@sha256:73d065c344b419ce97bba953c7887c7deead75e0998053518938231cd7beb22c
ports:
- "5432:5432"
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pguser
POSTGRES_DB: db
TZ: "America/Sao_Paulo"
restart: always
volumes:
- ./postgres-data:/var/lib/postgresql/data:rw
volumes:
postgres-data: