From 6ca62dba6e0d12a91be7b10bc30ce628a8cd38a1 Mon Sep 17 00:00:00 2001 From: Matteias Collet Date: Mon, 29 Jun 2020 00:39:07 +0200 Subject: [PATCH] add dockerfile --- .dockerignore | 2 ++ Dockerfile | 12 ++++++++++++ docker-compose.yml | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f24dfc2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules/ +docs/.vuepress/dist/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5d2b42e --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4199f8c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.7' + +services: + gct_generator: + container_name: gct_generator + build: + context: ./ + dockerfile: Dockerfile + network_mode: 'bridge' + ports: + - '8080:80'