diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcf9c84..feef9ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - test - build-binary - build-docker +- docs include: - '/.gitlab/ci/always.yml' diff --git a/.gitlab/ci/main-branch.yml b/.gitlab/ci/main-branch.yml index 2e3a527..c4294af 100644 --- a/.gitlab/ci/main-branch.yml +++ b/.gitlab/ci/main-branch.yml @@ -17,4 +17,14 @@ docker-build-prod-latest: --tag $CI_REGISTRY_IMAGE:latest \ . only: + - main + +generate-deploy-docs: + stage: docs + script: + - mkdocs build --strict --verbose + artifacts: + paths: + - docs-public + only: - main \ No newline at end of file diff --git a/README.md b/README.md index 49c4768..715e743 100644 --- a/README.md +++ b/README.md @@ -4,44 +4,8 @@ An easy self-hosted Link shortener in Golang with Redis <3 [Live-Demo](https://gly.one) --- -## Supported architectures -### Docker -- amd64, arm64 -- other versions can be build manually (via docker build / buildx) -## Binary Build -- linux (amd64,arm64) -- darwin (amd64,arm64) -- windows (amd64) -- other versions can be build manually (via go build) ---- + **WARNING:** - goshorly is in an early stage, it is not an Final Version! (Pre-Release Status v0.1.X) If you have an feature request, please do not hesitate to open an issue or merge request. - -Available Docker tags: -- https://git.ucode.space/Phil/goshorly/container_registry/1 - - -## Install with Docker -Installation with Docker-Compose (with no reverse proxy / own proxy): -```bash -mkdir goshorly -cd goshorly -wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose.yml -nano docker-compose.yml # Change the environment variables to your needs -docker-compose up -d -``` - -Installation with Docker-Compose (built in proxy / caddy as reverse proxy): -```bash -mkdir goshorly -cd goshorly -wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose-proxy.yml -mv docker-compose-proxy.yml docker-compose.yml -nano docker-compose.yml # Change the command line on caddy to your domain & environment variables to your needs -docker-compose up -d -``` - -## Install with Binary version -- WIP \ No newline at end of file diff --git a/docs/deploy/binary.md b/docs/deploy/binary.md new file mode 100644 index 0000000..87e9a58 --- /dev/null +++ b/docs/deploy/binary.md @@ -0,0 +1,27 @@ +# Binary installation + +## Download +Get the newest binary build from the package registry. +- https://git.ucode.space/Phil/goshorly/-/packages + +## Get dependencies +To get goshorly running you need redis. + +Installation guide for Windows: +- https://developer.redis.com/create/windows/ + +Installation guide for Linux: +- https://redis.io/topics/quickstart (compile guide) +- https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04-de (ubuntu/debian) + +Installation guide for Darwin/OSX: +- https://developer.redis.com/create/homebrew/ + +## Run +Just run the executable in a Powershell (windows) or Terminal (linux/darwin) + +### Configuration +#### .env File +To use the binary version you need to create an .env file in the directory. + +**This feature is coming soon** \ No newline at end of file diff --git a/docs/deploy/docker.md b/docs/deploy/docker.md new file mode 100644 index 0000000..037f4ad --- /dev/null +++ b/docs/deploy/docker.md @@ -0,0 +1,23 @@ +# Docker installation + +## Available Docker tags +- https://git.ucode.space/Phil/goshorly/container_registry/1 + +## docker-compose (with no reverse proxy) +```bash +mkdir goshorly +cd goshorly +wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose.yml +nano docker-compose.yml # Change the environment variables to your needs +docker-compose up -d +``` + +## docker-compose (with builtin reverse proxy) +```bash +mkdir goshorly +cd goshorly +wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose-proxy.yml +mv docker-compose-proxy.yml docker-compose.yml +nano docker-compose.yml # Change the command line on caddy to your domain & environment variables to your needs +docker-compose up -d +``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..80ddf63 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,22 @@ +# Welcome to goshorly +![](https://git.ucode.space/Phil/goshorly/badges/main/pipeline.svg) + +goshorly is an easy to use and self-hostable link shortener. It is based on the Golang programming language. Redis is used as the database. + +If you have an feature request, please do not hesitate to open an issue or merge request. + +**WARNING:** +- goshorly is in an early stage, it is not an Final Version! (Pre-Release Status v0.1.X) + +## Disclaimer +This site is work in progress and does not contain the full docs. + +## Supported architectures +### Docker +- amd64, arm64 +- other versions can be build manually (via docker build / buildx) +### Binary Build +- linux (amd64,arm64) +- darwin (amd64,arm64) +- windows (amd64) +- other versions can be build manually (via go build) \ No newline at end of file diff --git a/mkdocs-req.yml b/mkdocs-req.yml new file mode 100644 index 0000000..21f876b --- /dev/null +++ b/mkdocs-req.yml @@ -0,0 +1,2 @@ +mkdocs +mkdocs-material \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..1c09a75 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,11 @@ +site_name: goshorly docs +site_url: https://phil.mekelek.de/goshorly +repo_url: https://git.ucode.space/Phil/goshorly +site_dir: docs-public +theme: + name: material + locale: en + highlightjs: true + +nav: + - Home: 'index.md' \ No newline at end of file