forked from async-labs/saas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (105 loc) · 3.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: "3.7"
# these are vars to pick from /.env on build and run.
# leave the optionals empty
x-apibuildvars: &apibuildvars
LOG_LEVEL: ${LOG_LEVEL:-notice}
NODE_ENV: ${NODE_ENV:-development}
PORT: ${API_PORT:-8000}
x-apirunvars: &apirunvars
<<: *apibuildvars
APP_PORT: ${APP_PORT:-3000}
URL_APP: ${URL_APP:-http://app.saas.localhost:3000}
URL_API: ${URL_API:-http://api.saas.localhost:8000}
COOKIE_DOMAIN: ${COOKIE_DOMAIN:-.saas.localhost}
MONGO_URL: ${MONGO_URL:-mongodb://saas:secret@saas-mongo:27017/saas}
SESSION_NAME: ${SESSION_NAME:-saas.localhost.sid}
SESSION_SECRET: ${SESSION_SECRET:-D0cK3RS3Cr3t!}
GOOGLE_CLIENTID:
GOOGLE_CLIENTSECRET:
AMAZON_ACCESSKEYID:
AMAZON_SECRETACCESSKEY:
EMAIL_SUPPORT_FROM_ADDRESS:
MAILCHIMP_API_KEY:
MAILCHIMP_REGION:
MAILCHIMP_SAAS_ALL_LIST_ID:
STRIPE_TEST_SECRETKEY:
STRIPE_LIVE_SECRETKEY:
STRIPE_TEST_PUBLISHABLEKEY:
STRIPE_LIVE_PUBLISHABLEKEY:
STRIPE_TEST_PLANID:
STRIPE_LIVE_PLANID:
STRIPE_LIVE_ENDPOINTSECRET:
x-appvars: &appvars
LOG_LEVEL: ${LOG_LEVEL:-notice}
NODE_ENV: ${NODE_ENV:-development}
PORT: ${APP_PORT:-3000}
API_PORT: ${API_PORT:-8000}
URL_APP: ${URL_APP:-http://app.saas.localhost:3000}
URL_API: ${URL_API:-http://api.saas.localhost:8000}
STRIPEPUBLISHABLEKEY:
BUCKET_FOR_POSTS:
BUCKET_FOR_TEAM_AVATARS:
LAMBDA_API_ENDPOINT:
GA_TRACKING_ID:
services:
saas-api:
build:
context: api
args: *apibuildvars
image: saas-api:${COMPOSE_TAG_NAME:-stage}
container_name: saas-api
networks:
default:
aliases:
- api.saas.localhost
environment: *apirunvars
ports:
- "${API_PORT:-8000}:${API_PORT:-8000}"
depends_on:
- saas-mongo
command: yarn start
saas-app:
build:
context: app
args: *appvars
image: saas-app:${COMPOSE_TAG_NAME:-stage}
container_name: saas-app
networks:
default:
aliases:
- app.saas.localhost
environment: *appvars
ports:
- "${APP_PORT:-3000}:${APP_PORT:-3000}"
depends_on:
- saas-api
command: yarn start
saas-mongo:
image: mongo
container_name: saas-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-supersecret}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE:-saas}
MONGO_NON_ROOT_USERNAME: ${MONGO_NON_ROOT_USERNAME:-saas}
MONGO_NON_ROOT_PASSWORD: ${MONGO_NON_ROOT_PASSWORD:-secret}
ports:
- "27017:27017"
volumes:
# 20190601 - fix for https://github.com/docker-library/mongo/issues/329#issuecomment-460858099
- ./mongo-user.sh:/docker-entrypoint-initdb.d/mongo-user.sh:ro
- /tmp/saas-db:/data/db
saas-mongoexp:
image: mongo-express
container_name: saas-mongoexp
environment:
ME_CONFIG_MONGODB_SERVER: ${ME_CONFIG_MONGODB_SERVER:-saas-mongo}
ME_CONFIG_MONGODB_ADMINUSERNAME: ${ME_CONFIG_MONGODB_ADMINUSERNAME:-root}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${ME_CONFIG_MONGODB_ADMINPASSWORD:-supersecret}
ports:
- "8081:8081"
depends_on:
- saas-mongo
networks:
default:
driver: bridge