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:
parent
0a8218d59a
commit
fa1c821d4d
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
30
Dockerfile
Normal file
30
Dockerfile
Normal 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
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: '3'
|
||||
services:
|
||||
gatsby:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/portfolio
|
||||
ports:
|
||||
- "8000:8000"
|
@ -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
10
scripts/entry.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user