A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
1# SimpleLink
2
3A very performant and light (6mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres.
4
5
6
7
8
9## How to Run
10
11### From Docker:
12
13```Bash
14docker run -p 8080:8080 \
15 -e JWT_SECRET=change-me-in-production \
16 -v simplelink_data:/data \
17 ghcr.io/waveringana/simplelink:v2
18```
19
20Find the admin-setup-token pasted into the terminal output, or in admin-setup-token.txt in the container's root.
21
22This is needed to register with the frontend. (TODO, register admin account with ENV)
23
24### From Docker Compose:
25
26Edit the docker-compose.yml file. It comes included with a postgressql db for use
27
28## Build
29
30### From Source
31
32First configure .env.example and save it to .env
33
34If DATABASE_URL is set, it will connect to a Postgres DB. If blank, it will use an sqlite db in /data
35
36```bash
37git clone https://github.com/waveringana/simplelink && cd simplelink
38./build.sh
39cargo run
40```
41
42On an empty database, an admin-setup-token.txt is created as well as pasted into the terminal output. This is needed to make the admin account.
43
44Alternatively if you want a binary form
45
46```bash
47./build.sh --binary
48```
49
50then check /target/release for the binary named `SimpleGit`
51
52### From Docker
53
54```bash
55docker build -t simplelink .
56docker run -p 8080:8080 \
57 -e JWT_SECRET=change-me-in-production \
58 -v simplelink_data:/data \
59 simplelink
60```
61
62### From Docker Compose
63
64Adjust the included docker-compose.yml to your liking; it includes a postgres config as well.