forked from vinicius73/graphql-start-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 953 Bytes
/
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
version: "3.5"
services:
# Database
postgres:
image: postgres:11.2
restart: unless-stopped
container_name: "${APP_NAME}-postgres"
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- "15432:5432"
# Redis
redis:
image: redis:5-alpine
restart: unless-stopped
container_name: "${APP_NAME}-redis"
ports:
- "16379:6379"
# GraphQL
server:
build:
context: .
dockerfile: Dockerfile
user: "node"
restart: unless-stopped
working_dir: /home/node/app
container_name: "${APP_NAME}-server"
links:
- postgres
- redis
depends_on:
- postgres
- redis
environment:
- NODE_ENV=production
volumes:
- ./:/home/node/app
ports:
- ${PORT}:${PORT}
command: "yarn run startup:prod"