Automate frontend build

This commit is contained in:
Bálint Bokros 2018-01-11 17:47:44 +01:00
parent c26d3da98d
commit 0f73b093cc
3 changed files with 13 additions and 1 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src/frontend"]
path = src/frontend
url = https://github.com/avatao-content/tutorial-framework-ng

View File

@ -1,3 +1,11 @@
FROM node:9 as ngbuild
WORKDIR /data/
COPY src/frontend /data/
RUN yarn install --frozen-lockfile
RUN yarn build --no-progress
FROM avatao/ubuntu:16.04
# Install dependencies
@ -50,7 +58,7 @@ ENV TFW_EVENT_HANDLERS_DIR="/opt/event_handlers"
COPY src/event_handlers ${TFW_EVENT_HANDLERS_DIR}
ENV TFW_FRONTEND_DIR="/srv/frontend"
COPY src/frontend/dist ${TFW_FRONTEND_DIR}
COPY --from=ngbuild /data/dist ${TFW_FRONTEND_DIR}
ENV TFW_PUBLIC_PORT=8888
EXPOSE ${TFW_PUBLIC_PORT}

1
src/frontend Submodule

@ -0,0 +1 @@
Subproject commit 1af4333347abcd107e5a9905ec25a3355a9e776d