diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..ff1215323 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:8 + +WORKDIR /app + +COPY package.json . +RUN npm install +COPY . . + +EXPOSE 3000 + +CMD [ "npm", "start" ] diff --git a/README.md b/README.md index 77c397ffb..800f28599 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,23 @@ # innoQ Styleguide and Component Library -## Installation +## Without Docker - npm install +Install: -## Start + npm install This starts a local development server complete with asset pipeline: npm start -## Export static site - Export a static site to `./dist/site` npm run site +## With Docker & Docker-Compose + + docker-compose up + ## Deployment Everything in master gets deployed automatically to diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..cdaec8bbb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + web: + build: . + ports: + - '3000:3000' + volumes: + - .:/app + - node_modules:/app/node_modules +volumes: + node_modules: {}