mirror of
https://github.com/AtHeartEngineer/documentation.git
synced 2026-01-09 11:37:54 -05:00
add back
This commit is contained in:
35
Dockerfile
Executable file
35
Dockerfile
Executable file
@@ -0,0 +1,35 @@
|
||||
## docker build -t gcr.io/prysmaticlabs/documentation
|
||||
FROM node:11-alpine as builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
g++ \
|
||||
libc6-compat \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
make \
|
||||
nasm
|
||||
|
||||
WORKDIR /app/website
|
||||
COPY ./docs /app/docs
|
||||
COPY ./website /app/website
|
||||
|
||||
COPY ./website/package.json ./website/package-lock.json ./
|
||||
|
||||
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
|
||||
RUN npm i -g npm@6.4
|
||||
RUN npm ci
|
||||
RUN mv ./node_modules .
|
||||
|
||||
## Build the angular app in production mode and store the artifacts in dist folder
|
||||
RUN npm run build
|
||||
|
||||
# Copy only the dist dir.
|
||||
FROM nginx
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
COPY --from=builder /app/website/build/prysm-docs /usr/share/nginx/html
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
18
docker-compose.yml
Executable file
18
docker-compose.yml
Executable file
@@ -0,0 +1,18 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
docusaurus:
|
||||
build: .
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 35729:35729
|
||||
volumes:
|
||||
- ./docs:/app/docs
|
||||
- ./website/blog:/app/website/blog
|
||||
- ./website/core:/app/website/core
|
||||
- ./website/i18n:/app/website/i18n
|
||||
- ./website/pages:/app/website/pages
|
||||
- ./website/static:/app/website/static
|
||||
- ./website/sidebars.json:/app/website/sidebars.json
|
||||
- ./website/siteConfig.js:/app/website/siteConfig.js
|
||||
working_dir: /app/website
|
||||
Reference in New Issue
Block a user