From c03a02a0d4ebaf78692608a48d0d775e48ffbd50 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 1 Oct 2023 09:55:53 +0200 Subject: [PATCH] Rebrand to OpenShock --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 2 +- .github/workflows/ci-tag.yml | 2 +- Dockerfile | 8 ++++--- README.md | 28 ++++++++++++---------- docker-compose.yml | 15 ++++++------ package-lock.json | 4 ++-- package.json | 2 +- public/index.html | 10 ++++---- src/Footer.vue | 6 ++--- src/globals/config/config.container.js | 7 +++--- src/globals/config/config.development.js | 1 + src/globals/config/config.local.js | 3 ++- src/globals/config/config.production.js | 1 + src/views/Login/Login.vue | 2 +- src/views/public/Home.vue | 2 +- src/views/public/nav/PublicNavRoot.vue | 6 ++--- src/views/public/proxy/ShareLinksProxy.vue | 2 +- startup.sh | 9 +++---- 19 files changed, 61 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index b22edfe..ab31ba8 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -14,7 +14,7 @@ name: ci-develop env: BRANCH: develop REGISTRY: ghcr.io - ARTIFACT_NAME: shocklink-webui.zip + ARTIFACT_NAME: openshock-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: container NODE_ENV: development diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index ad8b8b8..93dc508 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -14,7 +14,7 @@ name: ci-master env: BRANCH: master REGISTRY: ghcr.io - ARTIFACT_NAME: shocklink-webui.zip + ARTIFACT_NAME: openshock-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: container NODE_ENV: production diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 55901ab..e44aa85 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -9,7 +9,7 @@ name: ci-tag # TARGET_ENV is used by Webpack to determine the build target. env: REGISTRY: ghcr.io - ARTIFACT_NAME: shocklink-webui.zip + ARTIFACT_NAME: openshock-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: container NODE_ENV: production diff --git a/Dockerfile b/Dockerfile index 36e64b9..c149c49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM nginx:1-alpine -ENV SHOCKLINK_API_URL=https://api.shocklink.net -ENV SHOCKLINK_WEBUI_URL=https://shocklink.net/#/ -ENV SHOCKLINK_SHARE_URL=https://shockl.ink/ +# Default values. +ENV OPENSHOCK_NAME=LocalShock +ENV OPENSHOCK_URL=http://localhost:5001 +ENV OPENSHOCK_API_URL=http://localhost:5002 +ENV OPENSHOCK_SHARE_URL=https://shockl.ink # Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html diff --git a/README.md b/README.md index 0e2cba6..bca0618 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ShockLink WebUI +# OpenShock WebUI -This is the ShockLink Web UI. It is a single-page application that communicates with the [ShockLink API](https://github.com/Shock-Link/API). It is written using JavaScript and SCSS using the Vue 3 framework. +This is the OpenShock Web UI. It is a single-page application that communicates with the [OpenShock API](https://github.com/OpenShock/API). It is written using JavaScript and SCSS using the Vue 3 framework. ## Contents @@ -16,29 +16,31 @@ This is the ShockLink Web UI. It is a single-page application that communicates # Configuring -The [webui](https://github.com/Shock-Link/WebUI/pkgs/container/webui) container supports configuration via environment variables. +The [webui](https://github.com/OpenShock/WebUI/pkgs/container/webui) container supports configuration via environment variables. |Variable|Default|Description| |-|-|-| -|`SHOCKLINK_API_URL`|`https://api.shocklink.net/`| URL of the API. | -|`SHOCKLINK_WEBUI_URL`|`https://shocklink.net/#/`| URL of the ShockLink WebUI. | -|`SHOCKLINK_SHARE_URL`|`https://shockl.ink/s/`| URL to prefix share links with. When visited, should redirect to `${SHOCKLINK_WEBUI_URL}/public/proxy/shares/links/{ID}`. | +|`OPENSHOCK_NAME`|`LocalShock`| Name of the OpenShock instance. | +|`OPENSHOCK_URL`|`http://webui:80`| URL of the OpenShock WebUI. (NO trailing slash!) | +|`OPENSHOCK_SHARE_URL`|`https://webui:80/s`| URL to prefix share links with. (NO trailing slash!) When visited, should redirect to `${OPENSHOCK_WEBUI_URL}/public/proxy/shares/links/{ID}`. | +|`OPENSHOCK_API_URL`|`http://api:80/`| URL of the API. (NO trailing slash!) | # Deployment -This documentation describes how to self-host the WebUI container. This might not be of interest to you if you are content using [ShockLink.net](https://shocklink.net). +This documentation describes how to self-host the WebUI container. This might not be of interest to you if you are content using a public OpenShock instance such as [ShockLink.net](https://shocklink.net). ## Using Docker -Assuming you are running on `localhost`, with [the API](https://github.com/Shock-Link/API) running on port `5001`: +Assuming you are running on `localhost`, with [the API](https://github.com/OpenShock/API) running on port `5001`: ```bash $ docker run \ -p 5002:80/tcp \ - -e SHOCKLINK_API_URL=http://localhost:5001/ \ - -e SHOCKLINK_WEBUI_URL=http://localhost:5002/#/ \ - -e SHOCKLINK_SHARE_URL=http://localhost:5002/#/public/proxy/shares/links/ \ - --name shocklink-webui \ - ghcr.io/shocklink/webui:latest + -e OPENSHOCK_NAME=LocalShock \ + -e OPENSHOCK_URL=http://localhost:5002 \ + -e OPENSHOCK_API_URL=http://localhost:5001 \ + -e OPENSHOCK_SHARE_URL=http://localhost:5002/#/public/proxy/shares/links/ \ + --name openshoc-webui \ + ghcr.io/OpenShock/webui:latest ``` ## Using `docker-compose` diff --git a/docker-compose.yml b/docker-compose.yml index 0a52706..9fefc40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,12 +14,12 @@ services: redis: image: redis/redis-stack-server:latest volumes: - - /opt/docker/shocklink/redis/redis-stack.conf:/redis-stack.conf + - /opt/docker/openshock/redis/redis-stack.conf:/redis-stack.conf # The API. - # Check https://github.com/Shock-Link/API for the latest configuration settings. + # Check https://github.com/OpenShock/API for the latest configuration settings. api: - image: ghcr.io/shock-link/api:latest + image: ghcr.io/OpenShock/api:latest depends_on: - db - redis @@ -32,12 +32,13 @@ services: # The Web UI (this repository). webui: - image: ghcr.io/redmushie/webui:master + image: ghcr.io/OpenShock/webui:master depends_on: - api ports: - "5002:80/tcp" environment: - - SHOCKLINK_API_URL=http://local:5001/ - - SHOCKLINK_WEBUI_URL=http://local:5002/#/ - - SHOCKLINK_SHARE_URL=http://local:5002/#/public/proxy/shares/links/ + - OPENSHOCK_NAME=LocalShock + - OPENSHOCK_URL=http://local:5002 + - OPENSHOCK_API_URL=http://api:80 + - OPENSHOCK_SHARE_URL=http://local:5002/#/public/proxy/shares/links/ diff --git a/package-lock.json b/package-lock.json index 9b51b2e..118b330 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "shocklink_web_ui", + "name": "openshock_web_ui", "version": "1.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "shocklink_web_ui", + "name": "openshock_web_ui", "version": "1.3.0", "license": "AGPL", "dependencies": { diff --git a/package.json b/package.json index fa1802f..3effb4b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "shocklink_web_ui", + "name": "openshock_web_ui", "version": "1.3.0", "description": "", "main": "index.js", diff --git a/public/index.html b/public/index.html index a924907..cbad2f9 100644 --- a/public/index.html +++ b/public/index.html @@ -4,13 +4,13 @@ - ShockLink + OPENSHOCK_NAME - + - - - + + + diff --git a/src/Footer.vue b/src/Footer.vue index 640a2b5..7ced790 100644 --- a/src/Footer.vue +++ b/src/Footer.vue @@ -1,8 +1,8 @@