-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (68 loc) · 1.71 KB
/
docker-compose.yml
File metadata and controls
74 lines (68 loc) · 1.71 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
services:
# Nginx web server acting as a reverse proxy for "web" and "api" services
nginx:
image: nginx:1.13.1-alpine
read_only: true
tmpfs:
- /var/cache/nginx
- /var/log/nginx
- /var/run
depends_on:
- api
ports:
- "8080:80"
- "8443:443"
volumes:
- ./config/nginx-snippets:/etc/nginx/snippets:ro
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# Data API and authentication/authorization
api:
image: node:8.1.2-alpine
hostname: api
depends_on:
- db
- redis
environment:
- CORS_ORIGIN=http://localhost:3001,http://localhost:3000
- DATABASE_URL=postgres://postgres@db:5432/dev
- DATABASE_DEBUG=false
- REDIS_URL=redis://redis:6379/0
- SESSION_SECRET=wZjwhFtzQsd7r87W6AZw45Sm
- FACEBOOK_ID=1821424564802638
- FACEBOOK_SECRET=2339bdf25f236a42fc3a18280bf455e8
- GOOGLE_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_SECRET=xxxxx
- TWITTER_KEY=xxxxx
- TWITTER_SECRET=xxxxx
expose:
- "8080"
ports:
- "127.0.0.1:9229:9229" # V8 inspector (when NODE_DEBUG=true)
volumes:
- yarn:/root/.cache/yarn
- ./:/usr/src/app
user: node
working_dir: /usr/src/app
command: node tools/run.js
# SQL and document data store
db:
image: postgres:9.6.3-alpine
read_only: true
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- db:/var/lib/postgresql/data
- ./config/postgres-initdb.sh:/docker-entrypoint-initdb.d/initdb.sh
# Distributed in-memory cache
redis:
image: redis:3.2.9-alpine
read_only: true
volumes:
- redis:/data
user: redis
volumes:
db:
redis:
yarn: