mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 13:41:20 +00:00
Automate frontend build
This commit is contained in:
parent
c26d3da98d
commit
0f73b093cc
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/frontend"]
|
||||||
|
path = src/frontend
|
||||||
|
url = https://github.com/avatao-content/tutorial-framework-ng
|
10
Dockerfile
10
Dockerfile
@ -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
|
FROM avatao/ubuntu:16.04
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
@ -50,7 +58,7 @@ ENV TFW_EVENT_HANDLERS_DIR="/opt/event_handlers"
|
|||||||
COPY src/event_handlers ${TFW_EVENT_HANDLERS_DIR}
|
COPY src/event_handlers ${TFW_EVENT_HANDLERS_DIR}
|
||||||
|
|
||||||
ENV TFW_FRONTEND_DIR="/srv/frontend"
|
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
|
ENV TFW_PUBLIC_PORT=8888
|
||||||
EXPOSE ${TFW_PUBLIC_PORT}
|
EXPOSE ${TFW_PUBLIC_PORT}
|
||||||
|
1
src/frontend
Submodule
1
src/frontend
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 1af4333347abcd107e5a9905ec25a3355a9e776d
|
Loading…
Reference in New Issue
Block a user