Build frontend in dockerfile

This commit is contained in:
Tulir Asokan 2018-11-11 00:52:28 +02:00
parent 5c62bb2671
commit 3d88277fd2
2 changed files with 11 additions and 0 deletions

View file

@ -1,9 +1,15 @@
FROM node:10 AS frontend-builder
COPY ./maubot/management/frontend /frontend
RUN cd /frontend && yarn --prod && yarn build
FROM alpine:3.8 FROM alpine:3.8
ENV UID=1337 \ ENV UID=1337 \
GID=1337 GID=1337
COPY . /opt/maubot COPY . /opt/maubot
COPY --from=frontend-builder /frontend/build /opt/maubot/frontend
WORKDIR /opt/maubot WORKDIR /opt/maubot
RUN apk add --no-cache \ RUN apk add --no-cache \
py3-aiohttp \ py3-aiohttp \

View file

@ -24,6 +24,11 @@ server:
port: 29316 port: 29316
# The base management API path. # The base management API path.
base_path: /_matrix/maubot/v1 base_path: /_matrix/maubot/v1
# The base path for the UI.
ui_base_path: /_matrix/maubot
# Override path from where to load UI resources.
# Set to false to using pkg_resources to find the path.
override_resource_path: /opt/maubot/frontend
# The base appservice API path. Use / for legacy appservice API and /_matrix/app/v1 for v1. # The base appservice API path. Use / for legacy appservice API and /_matrix/app/v1 for v1.
appservice_base_path: /_matrix/app/v1 appservice_base_path: /_matrix/app/v1
# The shared secret to sign API access tokens. # The shared secret to sign API access tokens.