This commit is contained in:
Matthias Kretschmann 2018-09-20 00:34:48 +02:00
parent 708fe21e92
commit 4cc02d2e52
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 13 additions and 8 deletions

View File

@ -1 +1,4 @@
node_modules
.git*
.cache
public

View File

@ -1,7 +1,5 @@
FROM node:alpine
EXPOSE 8000
RUN apk update && \
apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing \
vips-tools \
@ -21,8 +19,9 @@ RUN apk update && \
RUN mkdir -p /portfolio
WORKDIR /portfolio
VOLUME /portfolio
COPY ./scripts/entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT ["/entry.sh"]
COPY package.json .
RUN npm install --quiet && npm cache clean --force
#CMD [ "npm", "run", "dev" ]

View File

@ -2,7 +2,9 @@ version: '3'
services:
gatsby:
build: .
command: npm run dev
volumes:
- .:/portfolio
- /portfolio/node_modules
ports:
- "8000:8000"
- '8000:8000'

View File

@ -7,11 +7,12 @@
"license": "MIT",
"author": "Matthias Kretschmann <m@kretschmann.io>",
"scripts": {
"start": "npm run dev",
"lint:js": "eslint ./gatsby-*.js && eslint ./src/**/*.{js,jsx}",
"lint:css": "stylelint ./src/**/*.{css,scss}",
"lint": "npm run svg && npm run lint:js && npm run lint:css",
"build": "npm run svg && ./node_modules/gatsby/dist/bin/gatsby.js build",
"start": "npm run svg && ./node_modules/gatsby/dist/bin/gatsby.js develop",
"dev": "npm run svg && ./node_modules/gatsby/dist/bin/gatsby.js develop",
"format": "prettier --write 'src/**/*.{js,jsx}'",
"format:css": "prettier-stylelint --write --quiet 'src/**/*.{css,scss}'",
"test": "npm run lint && ./node_modules/.bin/ava **/*.test.js --verbose",