Skip to content

Commit

Permalink
Dockerfile created
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshtagadiya committed Feb 4, 2020
1 parent 9d5e721 commit 475c554
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
16 changes: 16 additions & 0 deletions admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
16 changes: 16 additions & 0 deletions admin/nginx.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
16 changes: 16 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
16 changes: 16 additions & 0 deletions client/nginx.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
16 changes: 16 additions & 0 deletions main/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
16 changes: 16 additions & 0 deletions main/nginx.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit 475c554

Please sign in to comment.