/
docker-compose.yml
59 lines (57 loc) · 1.12 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'
services:
nginx:
restart: always
image: 'pedrorio/typegraph_nginx'
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- '4000:80'
depends_on:
- api
api:
restart: always
image: 'pedrorio/typegraph_api'
build:
dockerfile: Dockerfile
context: ./api
environment:
- WAIT_HOSTS=postgres:5432, redis:6379
- SERVER_PORT
- CLIENT_PORT
- REDIS_PORT
- POSTGRES_PORT
- SERVER_HOST
- CLIENT_HOST
- REDIS_HOST
- POSTGRES_HOST
- CLIENT_PROTOCOL
- SERVER_PROTOCOL
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- SESSION_SECRET
- JWT_SECRET
volumes:
- /app/node_modules
- ./api:/app
depends_on:
- postgres
redis:
image: 'redis:latest'
ports:
- '6379:6379'
postgres:
image: 'postgres:latest'
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
ports:
- '5432:5432'
volumes:
- postgres_database:/var/lib/postgresql/data
volumes:
postgres_database: