-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (70 loc) · 2.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
services:
proxy:
image: jwilder/nginx-proxy
ports:
- 80:80
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
site:
image: node:8.15.1
command: npm start
working_dir: /usr/src/app
volumes:
- ./client:/usr/src/app
ports:
- 3000
environment:
NODE_ENV: development
VIRTUAL_HOST: site.localtest.me
VIRTUAL_PORT: 3000
REACT_APP_API_URL: http://api.localtest.me/api
REACT_APP_LINKEDIN_AUTH_URL: http://api.localtest.me/api/auth/linkedin
REACT_APP_GOOGLE_AUTH_URL: http://api.localtest.me/api/auth/google
REACT_APP_FACEBOOK_AUTH_URL: http://api.localtest.me/api/auth/facebook
api:
image: node:8.15.1
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; npm run dev'
working_dir: /usr/src/app
volumes:
- ./api:/usr/src/app
ports:
- 3000
depends_on:
- db
environment:
NODE_ENV: development
VIRTUAL_HOST: api.localtest.me
VIRTUAL_PORT: 3000
DATABASE_URL: postgres://user:password@db/api-db
FACEBOOK_ID: FACEBOOK_ID
FACEBOOK_SECRET: FACEBOOK_SECRET
GOOGLE_ID: GOOGLE_ID
GOOGLE_SECRET: GOOGLE_SECRET
LINKEDIN_ID: LINKEDIN_ID
LINKEDIN_SECRET: LINKEDIN_SECRET
GOOGLE_CALLBACK_URL: http://api.localtest.me/api/auth/google/callback
FACEBOOK_CALLBACK_URL: http://api.localtest.me/api/auth/facebook/callback
LINKEDIN_CALLBACK_URL: http://api.localtest.me/api/auth/linkedin/callback
SUCCESS_LOGIN_REDIRECT_URL: http://site.localtest.me/connect
DATABASE_POOL_MIN: 0
DATABASE_POOL_MAX: 10
ENABLE_NODE_CLUSTER: 'false'
db:
image: postgres:10.4
ports:
- 5432
command: postgres -D /run/pgsql-10.4-data -c logging_collector=on
volumes:
- ./api/db/local_database_volume:/run/pgsql-10.4-data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
environment:
LOGGING_COLLECTOR: 'on'
PGDATA: /run/pgsql-10.4-data
POSTGRES_DB: api-db
POSTGRES_PASSWORD: password
POSTGRES_USER: user