Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiego committed Jul 19, 2021
1 parent c0b1a59 commit 1234a7c
Show file tree
Hide file tree
Showing 5 changed files with 487 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"development": {
"presets": ["next/babel"]
},
"production": {
"presets": ["next/babel"]
},
"test": {
"presets": ["next/babel"],
"plugins": [
Expand Down
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tests
.next
coverage
node_modules
.editorconfig
.git
.gitignore
jest.config.json
jest.setup.tests
README.md
.eslintrc
.nvmrc
Dockerfile
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:14-alpine

COPY . /app
WORKDIR /app

ENV NODE_ENV "production"

RUN yarn install --production=false \
&& yarn build

RUN rm -rf node_modules \
&& rm -rf src \
&& yarn install --production=true

CMD ["yarn", "start"]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^7.8.1",
"eslint-config-next": "^11.0.1",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.0",
"jest": "^26.6.3",
Expand Down
Loading

0 comments on commit 1234a7c

Please sign in to comment.