-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat-aldeed-payment-checkout-components
- Loading branch information
Showing
6 changed files
with
78 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
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ ARG GIT_SHA1 | |
ARG LICENSE | ||
|
||
ENV APP_SOURCE_DIR=/usr/local/src/reaction-app \ | ||
PATH=$PATH:/usr/local/src/node_modules/.bin | ||
PATH=$PATH:/usr/local/src/reaction-app/node_modules/.bin | ||
|
||
LABEL maintainer="Reaction Commerce <[email protected]>" \ | ||
com.reactioncommerce.build-date=$BUILD_DATE \ | ||
|
@@ -57,11 +57,18 @@ LABEL maintainer="Reaction Commerce <[email protected]>" \ | |
# Because Docker Compose uses a volume for node_modules and volumes are owned | ||
# by root by default, we have to initially create node_modules here with correct owner. | ||
# Without this Yarn cannot write packages into node_modules later, when running in a container. | ||
RUN mkdir -p "/usr/local/src/node_modules" && chown node "/usr/local/src" && chown node "/usr/local/src/node_modules" | ||
RUN mkdir -p "/usr/local/src/reaction-app/node_modules" && chown node "/usr/local/src/reaction-app" && chown node "/usr/local/src/reaction-app/node_modules" | ||
RUN mkdir -p "/usr/local/src/reaction-app/node_modules" | ||
RUN mkdir -p "/usr/local/src/reaction-app/package/node_modules" | ||
RUN chown node "/usr/local/src" | ||
RUN chown node "/usr/local/src/reaction-app" | ||
RUN chown node "/usr/local/src/reaction-app/node_modules" | ||
RUN chown node "/usr/local/src/reaction-app/package/node_modules" | ||
|
||
WORKDIR $APP_SOURCE_DIR/.. | ||
COPY --chown=node package.json yarn.lock $APP_SOURCE_DIR/../ | ||
WORKDIR $APP_SOURCE_DIR | ||
|
||
# Note that the two node_modules directories will not be copied during | ||
# this due to being listed in the `.dockerignore` file. | ||
COPY --chown=node . $APP_SOURCE_DIR | ||
|
||
# Build the dependencies into the Docker image in a cacheable way. Dependencies | ||
# are only rebuilt when package.json or yarn.lock is modified. | ||
|
@@ -75,13 +82,20 @@ RUN set -ex; \ | |
--frozen-lockfile \ | ||
--ignore-scripts \ | ||
--no-cache; \ | ||
cd package && yarn install \ | ||
--frozen-lockfile \ | ||
--ignore-scripts \ | ||
--no-cache; \ | ||
elif [ "$BUILD_ENV" = "test" ]; then \ | ||
yarn install \ | ||
--frozen-lockfile \ | ||
--ignore-scripts \ | ||
--no-cache; \ | ||
fi; \ | ||
rm package.json yarn.lock | ||
cd package && yarn install \ | ||
--frozen-lockfile \ | ||
--ignore-scripts \ | ||
--no-cache; \ | ||
fi; | ||
|
||
# For development, we will yarn install on each container start. | ||
# This ensures that we use our Docker development .yarnrc config | ||
|
@@ -95,15 +109,6 @@ RUN set -ex; \ | |
# we already ran yarn install above, it doesn't matter. | ||
COPY --chown=node ./.reaction/yarnrc-docker.template /home/node/.yarnrc | ||
|
||
WORKDIR $APP_SOURCE_DIR | ||
COPY --chown=node . $APP_SOURCE_DIR | ||
|
||
RUN set -ex; \ | ||
cd package && yarn install \ | ||
--frozen-lockfile \ | ||
--ignore-scripts \ | ||
--no-cache; | ||
|
||
# Important: Make sure we're the "node" user before we begin doing things because | ||
# our tools use "/home/node" as the HOME dir. | ||
USER 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
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,52 @@ | ||
# Contributing | ||
|
||
We're thrilled that you want to contribute to the Reaction Component Library! | ||
|
||
Before submitting your first contribution, please consult the [official guide on contributing to the Reaction code base](https://docs.reactioncommerce.com/docs/contributing-to-reaction) first. The sections below are currently specific to the Reaction Component Library and should be considered in addition to the official guide. | ||
|
||
# Signing your Commits | ||
|
||
Contributing to the Reaction Component Library requires signing your work by way of signed Git commits. | ||
|
||
The Reaction Component Library uses the Apache 2.0 license to allow our community and customers to use it in whichever way they please. It also helps foster open contributions. | ||
|
||
As a contributor, we want to make sure that you understand your rights as the copyright holder. We also want to make sure that contributions done on behalf of companies (i.e. by their employees) are submitted with the acknowledgement that the contributor (employee) isn't the copyright holder (employer). | ||
|
||
The Reaction Components Library is using a Developer Certificate of Origin (DCO), by way of signed commits, to help contributors acknowledge that they're aware of their rights, and that they have the authority to submit their contributions either on their or on their employer's behalf. | ||
|
||
To sign off on the DCO for your commits, use the command `git commit -s` which adds a line to every commit that looks like this: | ||
|
||
`Signed-Off-By: Jane Doe <[email protected]>` | ||
|
||
We do ask that you use your full name and a valid email address in this process. | ||
|
||
The DCO signoff is attached to every single commit, thereby stating that the committer agrees to the DCO as shown below or on <https://developercertificate.org/>. | ||
|
||
``` | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the | ||
best of my knowledge, is covered under an appropriate open | ||
source license and I have the right under that license to | ||
submit that work with modifications, whether created in whole | ||
or in part by me, under the same open source license (unless | ||
I am permitted to submit under a different license), as | ||
Indicated in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including | ||
all personal information I submit with it, including my | ||
sign-off) is maintained indefinitely and may be redistributed | ||
consistent with this project or the open source license(s) | ||
involved. | ||
``` |