Add instruction on making service publicly available

This commit is contained in:
Gal 2024-04-11 07:30:19 +02:00
parent e63b4973fd
commit 0b97244e25
Signed by: gal
GPG Key ID: F035BC65003BC00B
1 changed files with 31 additions and 2 deletions

View File

@ -89,8 +89,6 @@ sudo apt remove docker docker-engine docker.io containerd runc
sudo rm /etc/apt/sources.list.d/docker.list sudo rm /etc/apt/sources.list.d/docker.list
``` ```
## 📦 Adding a new service ## 📦 Adding a new service
1. **Create Service Directory:** Inside your repository, create a new directory under `/service` for your new self-hosted service. 1. **Create Service Directory:** Inside your repository, create a new directory under `/service` for your new self-hosted service.
@ -105,6 +103,37 @@ make upload-{service_name}
``` ```
Replace `{service_name}` with the name of your service directory. This command will sync the configurations to the specified server path using the variables defined in your `.env` file. Replace `{service_name}` with the name of your service directory. This command will sync the configurations to the specified server path using the variables defined in your `.env` file.
## 📦 Make service publicly available
Add the following labels:
```
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(${HOST})"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=myresolver"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.docker.network=traefik_network"
```
Set `HOST` in your `.env` file.
Add your service to the `traefik_network` network:
```
networks:
- traefik_network
```
Add:
```
networks:
traefik_network:
external: true
```
## 🛠️ Storage ## 🛠️ Storage
### 📦 Mounting a New Volume Using Hetzner's Storage Box ### 📦 Mounting a New Volume Using Hetzner's Storage Box