Compare commits

...

5 Commits

Author SHA1 Message Date
6dd7a30b03 Add DNS
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-08 19:17:49 +02:00
33b68a1811 Update links
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-07 20:31:39 +02:00
805584b2e1 Update Readme and Caddy config
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-07 19:41:28 +02:00
60837143f6 Remove portainer
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-06 20:35:05 +02:00
4527aed52b Update name
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-06 17:21:39 +02:00
6 changed files with 70 additions and 21 deletions

View File

@ -13,7 +13,7 @@
DOCKER := docker
PROFILES := webserver wordpress adminer uptime-kuma portainer qbittorrent gitea jellyfin watchtower backup syncthing openssh
PROFILES := caddy wordpress adminer uptime-kuma qbittorrent gitea jellyfin watchtower backup openssh dns-server syncthing
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')

View File

@ -51,7 +51,7 @@ cd infrastructure
### Configure the domain
For all **bensuperpc.org**, you need to replace it with your domain, example: **mydomain.com**
For all **bensuperpc.org**, you need to replace it with your domain, example: **mydomain.com**, so the same for **bensuperpc.com** ect...
```sh
find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/bensuperpc.org/mydomain.com/g'
@ -59,19 +59,19 @@ find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/b
Check if all bensuperpc.* are replaced by your domain in [Caddyfile](caddy/wordpress/Caddyfile)
And then, caddy will generate the certificate for you and renew it automatically :D (It's easier than certbot and nginx)
And then, caddy will generate the certificate for you and renew it automatically :D
| Domain name | Type | Description |
| --- | --- | --- |
| bensuperpc.org | Main | Main domain |
| adminer.bensuperpc.org | Sub | Adminer for MariaDB for wordpress only |
| uptimekuma.bensuperpc.org | Sub | Uptime Kuma for monitoring |
| torrent.bensuperpc.org | Sub | Torrent server |
| git.bensuperpc.org | Sub | Gitea for git |
| link.bensuperpc.org | Sub | For link shortener |
| jellyfin.bensuperpc.org | Sub | Jellyfin for media server |
| syncthing.bensuperpc.org | Sub | SyncThing for file synchronization |
| ssh.bensuperpc.org | Sub | Openssh for ssh |
| [bensuperpc.org](https://bensuperpc.org) | Main | Main domain |
| [adminer.bensuperpc.org](https://adminer.bensuperpc.org) | Sub | Adminer for MariaDB for wordpress only |
| [uptimekuma.bensuperpc.org](https://uptimekuma.bensuperpc.org) | Sub | Uptime Kuma for monitoring |
| [torrent.bensuperpc.org](https://torrent.bensuperpc.org) | Sub | Torrent server |
| [git.bensuperpc.org](https://git.bensuperpc.org) | Sub | Gitea for git |
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
| [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) | Sub | SyncThing for file synchronization |
| [ssh.bensuperpc.org](https://ssh.bensuperpc.org) | Sub | Openssh for ssh |
| bensuperpc.com | Main | Redirect to bensuperpc.org |
| bensuperpc.fr | Main | Redirect to bensuperpc.org |
| bensuperpc.net | Main | Redirect to bensuperpc.org |
@ -168,11 +168,7 @@ You can find all services on the [docker-compose.yml](docker-compose.yml) file o
| SyncThing | SyncThing for file synchronization | [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) |
| Openssh | Openssh for ssh | [ssh.bensuperpc.org](https://ssh.bensuperpc.org) |
## URL
You can access to the website with:
- [bensuperpc.org](https://bensuperpc.org) and [www.bensuperpc.org](https://www.bensuperpc.org) (Wordpress for now)
You can disable some services by removing the service name in PROFILES variable in the [Makefile](Makefile) file.
## Build with

View File

@ -5,7 +5,7 @@ www.bensuperpc.org {
file_server
encode zstd gzip
#metrics /metrics
# metrics /metrics
@disallowed {
path /xmlrpc.php
@ -69,7 +69,19 @@ syncthing.bensuperpc.org {
}
}
dns.bensuperpc.org {
reverse_proxy dns-server:5380
}
link.bensuperpc.org {
# TODO: Use service with database
# Friendly links
redir /gnous https://gnous.eu permanent
redir /proxy https://imagisphe.re permanent
redir /patch https://spaceint.fr permanent
redir /greep https://greep.fr permanent
# Youtube links
redir /rickroll https://www.youtube.com/watch?v=dQw4w9WgXcQ permanent
redir /babyshark https://www.youtube.com/watch?v=XqZsoesa55w permanent
redir /cowcowcow https://www.youtube.com/watch?v=FavUpD_IjVY permanent

View File

@ -1,12 +1,12 @@
version: '3.9'
services:
# Webserver
# Caddy
caddy:
image: caddy:latest
container_name: webserver
container_name: caddy
profiles:
- webserver
- caddy
restart: on-failure
ports:
- 80:80

23
docker-compose.dns.yml Normal file
View File

@ -0,0 +1,23 @@
version: '3.9'
services:
dns-server:
container_name: dns-server
hostname: dns-server
profiles:
- dns-server
image: technitium/dns-server:latest
restart: on-failure
networks:
- infra-network
security_opt:
- no-new-privileges:true
volumes:
- dns-config:/etc/dns
env_file:
- env/technitium.env
volumes:
dns-config:
name: dns-config

18
env/technitium.env vendored Normal file
View File

@ -0,0 +1,18 @@
DNS_SERVER_DOMAIN=dns-server
DNS_SERVER_ADMIN_PASSWORD=fddsdfF548TjSNbi490fzZspmLSDf
# DNS_SERVER_ADMIN_PASSWORD_FILE=password.txt
# DNS_SERVER_PREFER_IPV6=false
# DNS_SERVER_WEB_SERVICE_HTTP_PORT=5380
# DNS_SERVER_WEB_SERVICE_HTTPS_PORT=53443
# DNS_SERVER_WEB_SERVICE_ENABLE_HTTPS=true
# DNS_SERVER_WEB_SERVICE_USE_SELF_SIGNED_CERT=false
# DNS_SERVER_OPTIONAL_PROTOCOL_DNS_OVER_HTTP=true
# DNS_SERVER_RECURSION=AllowOnlyForPrivateNetworks
# DNS_SERVER_RECURSION_DENIED_NETWORKS=1.1.1.0/24
# DNS_SERVER_RECURSION_ALLOWED_NETWORKS=127.0.0.1, 192.168.1.0/24
# DNS_SERVER_ENABLE_BLOCKING=false
# DNS_SERVER_ALLOW_TXT_BLOCKING_REPORT=false
# DNS_SERVER_BLOCK_LIST_URLS=
# DNS_SERVER_FORWARDERS=1.1.1.1, 8.8.8.8
# DNS_SERVER_FORWARDER_PROTOCOL=Tcp
# DNS_SERVER_LOG_USING_LOCAL_TIME=true