forked from reactioncommerce/reaction
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
103 additions
and
1 deletion.
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
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,16 @@ | ||
.build | ||
.build.* | ||
.npm | ||
.git | ||
|
||
# This is necessary so plugins can use git repos as npm deps. | ||
# Leave this here unless you understand the implications. | ||
# See this issue for details: | ||
# https://github.com/reactioncommerce/reaction/pull/5118 | ||
!.git/modules/imports/plugins/custom | ||
|
||
.build.log | ||
Dockerfile | ||
.reaction/docker/reaction.* | ||
docs | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Dockerfile for production builds | ||
FROM reactioncommerce/node-prod:14.18.1-v1 | ||
|
||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/src/app/node_modules/.bin | ||
|
||
# The `node-prod` base image installs NPM deps with --no-scripts. | ||
# This prevents the `sharp` lib from working because it installs the binaries | ||
# in a post-install script. We copy their install script here and run it. | ||
# hadolint ignore=DL3003,SC2015 | ||
RUN cd node_modules/sharp && (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) | ||
|
||
# The base image copies /src but we need to copy additional folders in this project | ||
COPY --chown=node:node ./public ./public | ||
COPY --chown=node:node ./plugins.json ./plugins.json |
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,25 @@ | ||
# 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: | ||
api: | ||
image: reactioncommerce/node-dev:14.18.1-v1 | ||
ports: | ||
- "3000:3000" | ||
- "9229:9229" | ||
volumes: | ||
- .:/usr/local/src/app:cached | ||
- api_node_modules:/usr/local/src/app/node_modules # do not link node_modules in, and persist it between dc up runs | ||
|
||
volumes: | ||
mongo-db4: | ||
api_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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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: | ||
reaction: | ||
external: | ||
name: reaction.localhost | ||
|
||
services: | ||
api: | ||
image: reactioncommerce/reaction:4.2.0 | ||
depends_on: | ||
- mongo | ||
env_file: | ||
- ./.env | ||
networks: | ||
default: | ||
reaction: | ||
ports: | ||
- "3000:3000" | ||
|
||
mongo: | ||
image: mongo:4.2.0 | ||
command: mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger | ||
networks: | ||
default: | ||
reaction: | ||
ports: | ||
- "27017:27017" | ||
volumes: | ||
- mongo-db4:/data/db | ||
healthcheck: # re-run rs.initiate() after startup if it failed. | ||
test: test $$(echo "rs.status().ok || rs.initiate().ok" | mongo --quiet) -eq 1 | ||
interval: 10s | ||
start_period: 30s | ||
|
||
volumes: | ||
mongo-db4: |