diff --git a/README.md b/README.md index 931a1cf..f0ff38b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ +![](https://git.ucode.space/Phil/goshorly/badges/main/pipeline.svg) # goshorly An easy self-hosted Link shortner in Golang with Redis <3 -Installation with Docker-Compose: +Installation with Docker-Compose (no reverse proxy): ```bash mkdir goshorly cd goshorly @@ -10,4 +11,12 @@ wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose.yml docker-compose up -d ``` -Your Instance is spinning up on port 3000 +Installation with Docker-Compose (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 (Line 20) to your domain +docker-compose up -d +``` diff --git a/docker-compose-proxy.yml b/docker-compose-proxy.yml new file mode 100644 index 0000000..0157873 --- /dev/null +++ b/docker-compose-proxy.yml @@ -0,0 +1,32 @@ +version: "3" +services: + web: + # build: . # Only if you want to Build the image on your own Server! + image: registry.ucode.space/phil/goshorly:latest + depends_on: + - redis + restart: always + + redis: + image: redis:alpine + command: redis-server --appendonly yes + volumes: + - db:/data + restart: always + + caddy: + image: caddy:2 + restart: always + command: caddy reverse-proxy --from https://my-domain.com:443 --to http://web:3000 + ports: + - 80:80 + - 443:443 + volumes: + - caddy:/data + depends_on: + - web + - redis + +volumes: + caddy: + db: