-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #623 from reactioncommerce/chore-use-published-ima…
…ge-for-dc chore: use published image for docker-compose
- Loading branch information
Showing
5 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ src/.next/* | |
build | ||
/reports | ||
|
||
package-lock.json | ||
docker-compose.override.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit # always exit on error | ||
set -o pipefail # don't ignore exit codes when piping output | ||
# set -x # enable debugging | ||
|
||
IFS="$(printf "\n\t")" | ||
|
||
cd "$(dirname "$0")/.." | ||
printf "Creating hydra client…" | ||
./bin/wait-for.sh "${OAUTH2_HOST}:${OAUTH2_ADMIN_PORT}" | ||
./bin/create-hydra-client.js | ||
node . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This docker-compose file is used to run the project in Docker for development. | ||
# The local files are mounted into the created container. | ||
# | ||
# Usage: | ||
# ln -s docker-compose.dev.yml docker-compose.override.yml | ||
# docker-compose up [-d] | ||
# | ||
# To go back to running the published image: | ||
# rm docker-compose.override.yml | ||
|
||
version: '3.4' | ||
|
||
services: | ||
web: | ||
image: reactioncommerce/node-dev:10.16.3-v2 | ||
volumes: | ||
- .:/usr/local/src/app | ||
- web-yarn:/home/node/.cache/yarn | ||
# Do not link in node_modules from the host | ||
# This allows IDEs to run lint etc with native add-ons for host OS | ||
# Without interfering with native add-ons in container | ||
- empty_node_modules:/usr/local/src/app/node_modules | ||
|
||
volumes: | ||
web-yarn: | ||
empty_node_modules: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
# This docker-compose file is used to run the Example Storefront in Docker for development. | ||
# The local files are mounted into the created container. | ||
# This docker-compose file is used to run the project's published image | ||
# | ||
# Usage: docker-compose up [-d] | ||
# | ||
# See comment in docker-compose.dev.yml if you want to run for development. | ||
|
||
version: '3.4' | ||
|
||
networks: | ||
api: | ||
external: | ||
name: api.reaction.localhost | ||
auth.reaction.localhost: | ||
auth: | ||
external: | ||
name: auth.reaction.localhost | ||
|
||
services: | ||
web: | ||
image: reactioncommerce/node-dev:10.16.3-v2 | ||
image: reactioncommerce/example-storefront:release-v3.0.0 | ||
# The only reason we need to override the command is to auto-create | ||
# the Hydra client if it doesn't exist. In the future, we plan to | ||
# make this logic part of the codebase, at which point this can be | ||
# removed. | ||
command: "./bin/start-prod.sh" | ||
env_file: | ||
- ./.env | ||
networks: | ||
api: | ||
aliases: | ||
- storefront | ||
auth.reaction.localhost: | ||
auth: | ||
ports: | ||
- 4000:4000 | ||
volumes: | ||
- web-yarn:/home/node/.cache/yarn | ||
- .:/usr/local/src/app | ||
# Do not link in node_modules from the host | ||
# This allows IDEs to run lint etc with native add-ons for host OS | ||
# Without interfering with native add-ons in container | ||
- empty_node_modules:/usr/local/src/app/node_modules | ||
|
||
volumes: | ||
web-yarn: | ||
empty_node_modules: | ||
# This volume is needed only to run the `command` above. | ||
# When the command is removed, this volume can also be removed. | ||
- ./bin:/usr/local/src/app/bin |