Added secound docker-compose for proxy
This commit is contained in:
parent
aca1a58960
commit
c79e2620b5
2 changed files with 43 additions and 2 deletions
13
README.md
13
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
|
||||
```
|
||||
|
|
32
docker-compose-proxy.yml
Normal file
32
docker-compose-proxy.yml
Normal 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:
|
Loading…
Reference in a new issue