From 3d88277fd24b0643ef82950b2e71d280608e950a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 11 Nov 2018 00:52:28 +0200 Subject: [PATCH] Build frontend in dockerfile --- Dockerfile | 6 ++++++ docker/example-config.yaml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 710b778..ae90a34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 ENV UID=1337 \ GID=1337 COPY . /opt/maubot +COPY --from=frontend-builder /frontend/build /opt/maubot/frontend WORKDIR /opt/maubot RUN apk add --no-cache \ py3-aiohttp \ diff --git a/docker/example-config.yaml b/docker/example-config.yaml index 77f97f0..a273629 100644 --- a/docker/example-config.yaml +++ b/docker/example-config.yaml @@ -24,6 +24,11 @@ server: port: 29316 # The base management API path. 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. appservice_base_path: /_matrix/app/v1 # The shared secret to sign API access tokens.