Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented a working production UI dockerfile for Bassa #797

Merged
merged 2 commits into from
Aug 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
FROM node:9 as builder
kmehant marked this conversation as resolved.
Show resolved Hide resolved
#----------------------- Builder
FROM node:8-alpine 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 modules
RUN apk update && \
npm install && \
npm install --global bower gulp-cli

# 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" \
Expand Down