add dockerfile

This commit is contained in:
Matteias Collet 2020-06-29 00:39:07 +02:00
parent bd3efb6812
commit 6ca62dba6e
3 changed files with 25 additions and 0 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
node_modules/
docs/.vuepress/dist/

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM node:lts-buster AS build
WORKDIR /src
COPY . .
RUN yarn
RUN yarn build
FROM httpd:latest AS final
WORKDIR /usr/local/apache2/htdocs/
COPY --from=build /src/docs/.vuepress/dist .
EXPOSE 80
CMD ["httpd-foreground"]

11
docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
version: '3.7'
services:
gct_generator:
container_name: gct_generator
build:
context: ./
dockerfile: Dockerfile
network_mode: 'bridge'
ports:
- '8080:80'