mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2025-06-28 11:55:12 +00:00
Automate frontend build
This commit is contained in:
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
Submodule src/frontend added at 1af4333347
Reference in New Issue
Block a user