Skip to content

Commit

Permalink
Merge pull request #42 from redmushie/master
Browse files Browse the repository at this point in the history
Improve README
  • Loading branch information
LucHeart authored Sep 20, 2023
2 parents 3254633 + 97cd803 commit 0679010
Showing 1 changed file with 56 additions and 9 deletions.
65 changes: 56 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,68 @@
# ShockLink WebUI

Frontend written in JavaScript and Vue 3.
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.

## Contents

- [Deployment](#deployment)
- [Using Docker](#using-docker)
- [Using `docker-compose`](#using-docker-compose)
- [Development](#development)
- [Dependencies](#dependencies)
- [Development](#development-1)
- [Build](#build)
- [Support](#support)

# Configuring

The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container unfortunately does not support any configuration beyond nginx configuration, as it is currently based on `nginx:alpine`.

If you wish to change the API that the WebUI communicates with, locally modify the [configuration file](src/globals/config/config.production.js) and build the container manually.

# 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).

## Using Docker

```bash
$ docker run \
-p 80:80/tcp \
--name shocklink-webui \
ghcr.io/shocklink/shocklink-webui:latest
```

## Using `docker-compose`
At the time of writing, the [ShockLink API](https://github.com/Shock-Link/API) is not yet readily available. This example contains **only** the WebUI.

```yml
version: '3.9'

services:
webui:
image: ghcr.io/shock-link/shocklink-webui:latest
container_name: shocklink-webui
ports:
- "80:80/tcp"
```
# Development
Contributions are welcome! We're eager to see what you come up with. Make sure to [join us on Discord](https://discord.gg/AHcCbXbEcF).
## Dependencies
Needed:
- NodeJs 17.9.1 or newer.
Recommended:
- VSCode
- Web- or PhpStorm
To get started with development, you will need the following things:
- NodeJs 17.9.1 or newer.
- An IDE or editor:
- VSCode
- Web- or PhpStorm
## Development
To start a local development server, use the command `npm run start`.
To start a local development server, check out the repository and run the command `npm run start`.

## Build
To make a production ready build, use the comman `npm run build`.
This will output static web files to `./dist/` which can be deployed on prettymuch any webserver.
To make a production ready build, use the command `npm run build`.
This will output static web files to `./dist/` which can be deployed on pretty much any webserver.

This also works for cloudflare pages auto build pipeline.

Expand Down

0 comments on commit 0679010

Please sign in to comment.