Open
Conversation
Closed
|
I think it's a great idea to add Dockerfile for plantuml-editor. However, some things seem to have changed in the meantime. Dockerfile
These changes would result in the following files: Dockerfile FROM node:12 AS builder
# fetch sources
COPY . /usr/app
#RUN wget "https://github.com/kkeisuke/plantuml-editor/archive/refs/heads/master.zip" && \
# unzip "master.zip" && \
# mv plantuml-editor-master /usr/app
WORKDIR /usr/app
# NOTE
# - tailing "/" is important! (At least for VUE_APP_CDN.)
# - VUE_APP_SERVER will never used. (Drop it?)
# See PR#19
# https://github.com/kkeisuke/plantuml-editor/pull/19
ARG VUE_APP_URL=https://plantuml-editor.kkeisuke.com/
ARG VUE_APP_SERVER=https://plantuml-server.kkeisuke.dev/
ARG VUE_APP_CDN=https://plantuml-server.kkeisuke.dev/
# build app
RUN npm install && \
npm run flow-typed && \
npm run build
# NGINX Alpine as minimal web server
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
COPY --from=builder /usr/app/dist/ .README.md Part: # build with docker
docker build \
-t plantuml-editor \
--build-arg VUE_APP_URL=http://localhost:8080/ \
--build-arg VUE_APP_SERVER=http://localhost:4000/ \
--build-arg VUE_APP_CDN=http://localhost:4000/ \
.
# or with PR#19
# https://github.com/kkeisuke/plantuml-editor/pull/19
docker build \
-t plantuml-editor \
--build-arg VUE_APP_URL=http://localhost:8080 \
--build-arg VUE_APP_CDN=http://localhost:4000 \
.
# run plantuml-editor server with docker
docker run -d -p 8080:80 --name plantuml-editor plantuml-editorAnd if docker-compose is a thing: version: '3'
services:
plantuml-editor:
build:
context: .
dockerfile: Dockerfile
args:
- VUE_APP_URL=http://localhost:8080
- VUE_APP_SERVER=http://localhost:4000/
- VUE_APP_CDN=http://localhost:4000/
restart: always
container_name: plantuml-editor
#environment:
# - TZ=...
ports:
- 8080:80 |
Author
|
@HeinrichAD |
|
Thank you this, I've wrapped this up with a docker-compose shell for a turn-key self-hosted plantuml editor, over here https://github.com/dylan-shipwell/plantuml-editor just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--envoption at build time. Use custom plantuml server #10