-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
217 lines (203 loc) · 7.54 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
version: '3.4'
services:
acc-text-api:
image: acctext/api:latest
networks:
- default
ports: ["3001:3001"]
environment:
GF_ENDPOINT: "http://gf:8000"
DISPLAY_ERROR: "TRUE"
ENABLE_ENRICH: "FALSE"
ENABLE_REF_EXPR: "FALSE"
DB_IMPLEMENTATION: "datomic"
DB_URI: "datomic:free://datomic-transactor:4334/acc-text?password=datomic"
DATA_FILES: "/opt/data-files"
DICT_PATH: "/opt/dictionary"
DOCUMENT_PLANS: "/opt/document-plans"
ENABLED_LANGUAGES: "Eng"
volumes:
- ./api/resources:/opt
depends_on:
- datomic-transactor
- gf
datomic-transactor:
image: "gordonstratton/datomic-free-transactor:latest"
environment:
DATOMIC_HOST: "datomic-transactor"
DATOMIC_ALT_HOST: "acc-text-api"
volumes:
- datomic:/srv/datomic/data
- ./accelerated-text/transactor-logback.xml:/srv/datomic/bin/logback.xml
gf:
image: acctext/gf:latest
ports: ["8001:8000"]
acc-text-front-end:
image: acctext/frontend:latest
ports: ["8080:80"]
reaction-api:
image: reactioncommerce/reaction:3.3.0
depends_on:
- reaction-mongo
environment:
- MONGO_URL=mongodb://reaction-mongo:27017/reaction
- ROOT_URL=http://localhost:3000
- STRIPE_API_KEY=YOUR_PRIVATE_STRIPE_API_KEY
ports:
- "3000:3000"
volumes:
- ./reaction-admin/imports/plugins/custom/reaction-acc-text-import/translations:/usr/local/src/app/src/plugins/custom/acc-text-import
- ./registerPlugins.override.js:/usr/local/src/app/src/registerPlugins.js
reaction-mongo:
image: mongo:4.2.0
command: mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger
ports:
- "27017:27017"
volumes:
- ./data/mongo-db:/data/db
reaction-admin:
# The main `docker-compose.yml` has an `image` prop. Unfortunately, when we
# add `build` prop here, it changes the meaning of that `image` prop to
# "tag the built image with this image name". This has the effect of breaking
# the app after you've run with the override and then go back to running without
# it, because now `reactioncommerce/admin:trunk` would actually be your dev image.
# To work around this issue, we specify a different tag name here, which does not
# match any of our published tags.
image: reactioncommerce/admin:local-dev
build:
context: ./reaction-admin/
dockerfile: Dockerfile-dev
command: bash -c "export PATH=$PATH:/home/node/.meteor && npm install --no-audit && node ./.reaction/waitForMongo.js && node --experimental-modules ./.reaction/scripts/run.mjs"
environment:
- MONGO_URL=mongodb://reaction-mongo:27017/reaction
- PORT=4080
- METEOR_DISABLE_OPTIMISTIC_CACHING=1
- METEOR_WATCH_POLLING_INTERVAL_MS=10000
- MONGO_OPLOG_URL=mongodb://reaction-mongo:27017/local
- OAUTH2_ADMIN_URL=http://hydra:4445
- OAUTH2_IDP_PUBLIC_CHANGE_PASSWORD_URL=http://localhost:4100/account/change-password?email=EMAIL&from=FROM
- OAUTH2_PUBLIC_URL=http://localhost:4444
- PUBLIC_GRAPHQL_API_URL_HTTP=http://localhost:3000/graphql
- PUBLIC_GRAPHQL_API_URL_WS=ws://localhost:3000/graphql
- PUBLIC_FILES_BASE_URL=http://localhost:3000
- PUBLIC_I18N_BASE_URL=http://localhost:3000
- PUBLIC_STOREFRONT_HOME_URL=http://localhost:4000
- ROOT_URL=http://localhost:4080
- UPLOAD_URL=http://reaction-api:3000/assets/uploads
ports:
- "4080:4080"
volumes:
- ./reaction-admin/:/usr/local/src/app:cached
- reaction_meteor_local:/usr/local/src/app/.meteor/local
- reaction_node_modules:/usr/local/src/app/node_modules # do not link node_modules in, and persist it between dc up runs
postgres:
image: postgres:10.3
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=changeme
- POSTGRES_DB=hydra
ports:
- 5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
hydra-migrate:
image: oryd/hydra:v1.0.8
command: migrate sql -e -y
depends_on:
- postgres
environment:
- DSN=postgres://hydra:changeme@postgres:5432/hydra?sslmode=disable
- OAUTH2_EXPOSE_INTERNAL_ERRORS=true
- OIDC_SUBJECT_IDENTIFIERS_ENABLED=true
- OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis
- SECRETS_SYSTEM=youReallyNeedToChangeThis
- SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=http://localhost:4080
- SERVE_PUBLIC_CORS_ENABLED=true
- URLS_CONSENT=http://localhost:4100/consent
- URLS_ERROR=http://localhost:4100/account/oauth-error
- URLS_LOGIN=http://localhost:4100/login
- URLS_LOGOUT=http://localhost:4100/logout
- URLS_SELF_ISSUER=http://localhost:4444
restart: on-failure
hydra:
image: oryd/hydra:v1.0.8
command: serve all --dangerous-force-http
depends_on:
- hydra-migrate
- postgres
ports:
# Public port
- "4444:4444"
# Admin port
- "4445:4445"
# Port for hydra token user
- "5555:5555"
environment:
- DSN=postgres://hydra:changeme@postgres:5432/hydra?sslmode=disable
- OAUTH2_EXPOSE_INTERNAL_ERRORS=true
- OIDC_SUBJECT_IDENTIFIERS_ENABLED=true
- OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis
- SECRETS_SYSTEM=youReallyNeedToChangeThis
- SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=http://localhost:4080
- SERVE_PUBLIC_CORS_ENABLED=true
- URLS_CONSENT=http://localhost:4100/consent
- URLS_ERROR=http://localhost:4100/account/oauth-error
- URLS_LOGIN=http://localhost:4100/login
- URLS_LOGOUT=http://localhost:4100/logout
- URLS_SELF_ISSUER=http://localhost:4444
restart: unless-stopped
web:
image: reactioncommerce/example-storefront:3.0.0
depends_on:
- hydra
- identity
environment:
- CANONICAL_URL=http://localhost:4000
- ENABLE_SPA_ROUTING=true
- EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql
- INTERNAL_GRAPHQL_URL=http://reaction-api:3000/graphql
- OAUTH2_ADMIN_PORT=4445
- OAUTH2_ADMIN_URL=http://hydra:4445
- OAUTH2_AUTH_URL=http://localhost:4444/oauth2/auth
- OAUTH2_CLIENT_ID=example-storefront
- OAUTH2_CLIENT_SECRET=CHANGEME
- OAUTH2_PUBLIC_LOGOUT_URL=http://localhost:4444/oauth2/sessions/logout
- OAUTH2_HOST=hydra.reaction.localhost
- OAUTH2_IDP_PUBLIC_CHANGE_PASSWORD_URL=http://localhost:4100/account/change-password?email=EMAIL&from=FROM
- OAUTH2_IDP_HOST_URL=http://localhost:4100
- OAUTH2_TOKEN_URL=http://localhost:4444/oauth2/token
- PORT=4000
- SEGMENT_ANALYTICS_SKIP_MINIMIZE=true
- SEGMENT_ANALYTICS_WRITE_KEY=ENTER_KEY_HERE
- SESSION_MAX_AGE_MS=2592000000
- SESSION_SECRET=CHANGEME
- STRIPE_PUBLIC_API_KEY=ENTER_STRIPE_PUBLIC_KEY_HERE
ports:
- 4000:4000
identity:
image: reactioncommerce/identity:3.0.0
depends_on:
- hydra
- reaction-mongo
- reaction-api
environment:
- API_URL=http://localhost:3000/graphql
- HYDRA_ADMIN_URL=http://hydra:4445
- HYDRA_TOKEN_URL=http://hydra:4444/oauth2/token
- LOG_LEVEL=debug
- METEOR_DISABLE_OPTIMISTIC_CACHING=1
- METEOR_WATCH_POLLING_INTERVAL_MS=10000
- MONGO_OPLOG_URL=mongodb://reaction-mongo:27017/local
- MONGO_URL=mongodb://reaction-mongo:27017/reaction
- OAUTH2_CLIENT_DOMAINS=http://localhost:4000
- PORT=4100
- ROOT_URL=http://localhost:4100
ports:
- "4100:4100"
volumes:
mongo-db:
reaction_meteor_local:
reaction_node_modules:
postgres-data:
datomic:
name: acc-text_datomic