From 475c554cc80524e69065b0e4377a024cc7b05056 Mon Sep 17 00:00:00 2001 From: mitesh Date: Tue, 4 Feb 2020 21:06:36 +0530 Subject: [PATCH] Dockerfile created --- admin/Dockerfile | 16 ++++++++++++++++ admin/nginx.conf | 16 ++++++++++++++++ client/Dockerfile | 16 ++++++++++++++++ client/nginx.conf | 16 ++++++++++++++++ main/Dockerfile | 16 ++++++++++++++++ main/nginx.conf | 16 ++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 admin/Dockerfile create mode 100644 admin/nginx.conf create mode 100644 client/Dockerfile create mode 100644 client/nginx.conf create mode 100644 main/Dockerfile create mode 100644 main/nginx.conf diff --git a/admin/Dockerfile b/admin/Dockerfile new file mode 100644 index 0000000..35c3c2a --- /dev/null +++ b/admin/Dockerfile @@ -0,0 +1,16 @@ +FROM node:13.6.0 as builder + +WORKDIR /var/lib/app/ +COPY ./package.json ./ +COPY ./package-lock.json ./ +COPY ./src/ ./src +COPY ./public/ ./public + +ARG PUBLIC_URL +RUN npm i +RUN npm run build + +FROM nginx:1.17.7 + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /var/lib/app/build/ /var/www/ diff --git a/admin/nginx.conf b/admin/nginx.conf new file mode 100644 index 0000000..b73ae49 --- /dev/null +++ b/admin/nginx.conf @@ -0,0 +1,16 @@ +events { + worker_connections 4096; +} + +http { + include mime.types; + + server { + listen 80; + root /var/www/; + + location / { + try_files $uri $uri/ /index.html; + } + } +} diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 0000000..35c3c2a --- /dev/null +++ b/client/Dockerfile @@ -0,0 +1,16 @@ +FROM node:13.6.0 as builder + +WORKDIR /var/lib/app/ +COPY ./package.json ./ +COPY ./package-lock.json ./ +COPY ./src/ ./src +COPY ./public/ ./public + +ARG PUBLIC_URL +RUN npm i +RUN npm run build + +FROM nginx:1.17.7 + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /var/lib/app/build/ /var/www/ diff --git a/client/nginx.conf b/client/nginx.conf new file mode 100644 index 0000000..b73ae49 --- /dev/null +++ b/client/nginx.conf @@ -0,0 +1,16 @@ +events { + worker_connections 4096; +} + +http { + include mime.types; + + server { + listen 80; + root /var/www/; + + location / { + try_files $uri $uri/ /index.html; + } + } +} diff --git a/main/Dockerfile b/main/Dockerfile new file mode 100644 index 0000000..35c3c2a --- /dev/null +++ b/main/Dockerfile @@ -0,0 +1,16 @@ +FROM node:13.6.0 as builder + +WORKDIR /var/lib/app/ +COPY ./package.json ./ +COPY ./package-lock.json ./ +COPY ./src/ ./src +COPY ./public/ ./public + +ARG PUBLIC_URL +RUN npm i +RUN npm run build + +FROM nginx:1.17.7 + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /var/lib/app/build/ /var/www/ diff --git a/main/nginx.conf b/main/nginx.conf new file mode 100644 index 0000000..b73ae49 --- /dev/null +++ b/main/nginx.conf @@ -0,0 +1,16 @@ +events { + worker_connections 4096; +} + +http { + include mime.types; + + server { + listen 80; + root /var/www/; + + location / { + try_files $uri $uri/ /index.html; + } + } +}