generated from GTBitsOfGood/nextjs-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #186 from GTBitsOfGood/hc/dockerize
Dockerize and move to Netlify
- Loading branch information
Showing
8 changed files
with
146 additions
and
19 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "$1" | ||
COMMIT_MSG=$1 YARN_COMMAND=commitlint docker-compose up --build --exit-code-from earthcraft earthcraft |
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,5 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint:fix | ||
yarn prettier | ||
YARN_COMMAND=lint:fix docker-compose up --build --exit-code-from earthcraft earthcraft | ||
YARN_COMMAND=prettier docker-compose up --build --exit-code-from earthcraft earthcraft |
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,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn build | ||
YARN_COMMAND=build docker-compose up --build --exit-code-from earthcraft earthcraft |
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 @@ | ||
FROM node:16 | ||
WORKDIR /usr/src/app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
EXPOSE 3000 | ||
ENV YARN_COMMAND=dev | ||
|
||
# If you want to use a different command, pass the YARN_COMMAND env variable to | ||
# docker-compose up --build | ||
|
||
# Ex. YARN_COMMAND=build docker-compose up --build | ||
|
||
ENTRYPOINT ["sh", "-c", "yarn $YARN_COMMAND"] |
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,20 @@ | ||
version: "3" | ||
|
||
services: | ||
earthcraft: | ||
build: | ||
context: . | ||
environment: | ||
- YARN_COMMAND=${YARN_COMMAND:-dev} | ||
- COMMIT_MSG=${COMMIT_MSG:-""} | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- .env.local | ||
volumes: | ||
- .:/usr/src/app | ||
- /usr/src/app/node_modules | ||
mongo: | ||
image: mongo:latest | ||
ports: | ||
- "27017:27017" |
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 |
---|---|---|
|
@@ -29,7 +29,8 @@ | |
"secrets:windows": "set /p BW_PASSWORD=Enter Bitwarden Password:&& (bw logout || VER>NUL) && yarn secrets:login", | ||
"secrets:login": "FOR /F %a IN ('bw login [email protected] %BW_PASSWORD% --raw') DO SET BW_SESSION=%a && yarn secrets:get", | ||
"secrets:get": "bw sync && bw get item 8ccfc499-cfc2-4e66-9e82-af0801429e85 | fx .notes > \".env.local\"", | ||
"prepare": "npx husky install" | ||
"prepare": "npx husky install", | ||
"commitlint": "cross-env npx commitlint --edit $COMMIT_MSG" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
|
2c3d196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for southface ready!
✅ Preview
https://southface-396cd4wzd-bitsofgood.vercel.app
Built with commit 2c3d196.
This pull request is being automatically deployed with vercel-action