1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-03 02:15:00 +01:00

develop with docker-compose

This commit is contained in:
Matthias Kretschmann 2018-06-17 02:12:21 +02:00
parent 0a8218d59a
commit fa1c821d4d
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 50 additions and 1 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM node:alpine
EXPOSE 8000
RUN apk update && \
apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing \
vips-tools \
vips-dev \
fftw-dev \
gcc \
g++ \
git \
make \
autoconf \
automake \
bash \
libc6-compat \
lcms2-dev \
libpng-dev \
&& rm -rf /var/cache/apk/*
RUN npm install --global gatsby-cli --no-optional
RUN mkdir -p /portfolio
WORKDIR /portfolio
VOLUME /portfolio
COPY ./scripts/entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT ["/entry.sh"]

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: '3'
services:
gatsby:
build: .
volumes:
- .:/portfolio
ports:
- "8000:8000"

View File

@ -11,7 +11,7 @@
"lint:css": "stylelint ./src/**/*.{css,scss}",
"lint": "npm run lint:js && npm run lint:css",
"build": "gatsby build",
"start": "gatsby develop",
"start": "docker-compose up",
"format": "prettier --write 'src/**/*.{js,jsx}'",
"format:css": "prettier-stylelint --write --quiet 'src/**/*.{css,scss}'",
"test": "npm run lint",

10
scripts/entry.sh Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
export PATH="$PATH:/usr/local/bin/gatsby"
# echo "Running npm install..."
# npm install
# rm -rf ./public
gatsby develop --host 0.0.0.0