From b256c973574ff2e6abdaf7b3b92a74b7c6ef2f2a Mon Sep 17 00:00:00 2001 From: Michel Date: Sat, 23 Sep 2023 22:21:42 +0200 Subject: [PATCH] New addition: Online SVG code editor --- onlinesvgcodeeditor/.env.sample | 5 +++++ onlinesvgcodeeditor/compose.yml | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 onlinesvgcodeeditor/.env.sample create mode 100644 onlinesvgcodeeditor/compose.yml diff --git a/onlinesvgcodeeditor/.env.sample b/onlinesvgcodeeditor/.env.sample new file mode 100644 index 0000000..abc0fea --- /dev/null +++ b/onlinesvgcodeeditor/.env.sample @@ -0,0 +1,5 @@ +# Uncomment and change the following variables if you want to use them. +#RESTART=unless-stopped +#ONLINESVGCODEEDITOR_CONTAINER_NAME=OnlineSVGcodeeditor +#ONLINESVGCODEEDITOR_TAG=latest +#ONLINESVGCODEEDITOR_PORT=3000 diff --git a/onlinesvgcodeeditor/compose.yml b/onlinesvgcodeeditor/compose.yml new file mode 100644 index 0000000..29f2cb4 --- /dev/null +++ b/onlinesvgcodeeditor/compose.yml @@ -0,0 +1,17 @@ +services: + # Online SVG code editor + onlinesvgcodeeditor: + container_name: ${ONLINESVGCODEEDITOR_CONTAINER_NAME:-OnlineSVGcodeeditor} + image: node:${ONLINESVGCODEEDITOR_TAG:-latest} + restart: ${RESTART:-unless-stopped} + command: > + sh -c "git clone https://github.com/nbelyh/editsvgcode.git && \ + cd editsvgcode && \ + npm install && \ + npm run build && \ + npm install -g serve && \ + serve -s dist" + healthcheck: + test: curl -f http://localhost:3000/ || exit 1 + ports: + - ${ONLINESVGCODEEDITOR_PORT:-3000}:3000