Added secound docker-compose for proxy

This commit is contained in:
Phil 2021-12-07 19:32:48 +01:00
parent aca1a58960
commit c79e2620b5
2 changed files with 43 additions and 2 deletions

View file

@ -1,8 +1,9 @@
![](https://git.ucode.space/Phil/goshorly/badges/main/pipeline.svg)
# goshorly # goshorly
An easy self-hosted Link shortner in Golang with Redis <3 An easy self-hosted Link shortner in Golang with Redis <3
Installation with Docker-Compose: Installation with Docker-Compose (no reverse proxy):
```bash ```bash
mkdir goshorly mkdir goshorly
cd goshorly cd goshorly
@ -10,4 +11,12 @@ wget https://git.ucode.space/Phil/goshorly/-/raw/main/docker-compose.yml
docker-compose up -d 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
```

32
docker-compose-proxy.yml Normal file
View file

@ -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: