-
-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added production ready dockerfile for Bassa UI
- Loading branch information
Showing
1 changed file
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,44 @@ | ||
FROM node:9 as builder | ||
#----------------------- Builder | ||
FROM ubuntu:bionic as builder | ||
|
||
WORKDIR /home/Bassa | ||
|
||
RUN ls \ | ||
&& npm install -g bower \ | ||
&& npm install -g gulp \ | ||
&& npm link gulp | ||
# Setting the current work directory to ui | ||
WORKDIR /ui | ||
|
||
# Copying complete ui component in to the container | ||
COPY . . | ||
|
||
RUN yarn install \ | ||
&& gulp | ||
# Installing node, bower, gulp and yarn | ||
RUN apt-get update \ | ||
&& apt-get install curl -y \ | ||
&& apt install nodejs npm -y \ | ||
&& npm install bower \ | ||
&& npm install gulp \ | ||
&& npm install -g gulp \ | ||
&& npm install --global gulp-cli \ | ||
&& npm install yarn -g \ | ||
&& apt-get install yarn -y \ | ||
&& apt remove cmdtest -y \ | ||
&& apt-get install git -y && yarn install | ||
|
||
# Building the ui component to obtain static files. | ||
RUN gulp build | ||
|
||
FROM nginx:alpine | ||
#------------------------------ Production | ||
FROM nginx:alpine as production | ||
|
||
MAINTAINER SCoRe Lab Community <[email protected]> | ||
|
||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=builder /home/Bassa/dist /var/www/bassa | ||
# copy static files | ||
COPY --from=builder /ui/dist/ /usr/share/nginx/html | ||
|
||
|
||
# Expose ports | ||
EXPOSE 80 | ||
|
||
# Adding metadata as docker labels | ||
LABEL multi.org.label-schema.name="Bassa" \ | ||
multi.org.label-schema.description="Bassa provides Automated Download Queue to make the best use of Internet bandwidth" \ | ||
multi.org.label-schema.url="https://github.com/scorelab/Bassa/wiki" \ | ||
|