mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 06:18:58 +01:00
chore: add docker configs
This commit is contained in:
parent
0d1a62d655
commit
ae22bd963a
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.git
|
||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
6
Dockerfile.development
Normal file
6
Dockerfile.development
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
|
VOLUME /usr/src/app
|
||||||
|
WORKDIR /usr/src/app
|
21
Dockerfile.production
Normal file
21
Dockerfile.production
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM node:alpine as builder
|
||||||
|
|
||||||
|
RUN apk update && apk add --no-cache make git python autoconf g++ libc6-compat libjpeg-turbo-dev libpng-dev nasm
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn install
|
||||||
|
RUN yarn build
|
||||||
|
RUN rm -rf ./src ./node_modules /usr/local/lib/node_modules /usr/local/share/.cache/yarn/
|
||||||
|
RUN mkdir -p /run/nginx
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
|
|
||||||
|
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
12
docker-compose.development.yml
Normal file
12
docker-compose.development.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: alxshelepenok/gatsby-starter-lumen:development
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: Dockerfile.development
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./:/usr/src/app
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
12
docker-compose.production.yml
Normal file
12
docker-compose.production.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: alxshelepenok/gatsby-starter-lumen:production
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: Dockerfile.production
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./:/usr/src/app
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
Loading…
Reference in New Issue
Block a user