mirror of
https://gitlab.com/futile/thingy.git
synced 2026-07-20 21:50:15 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.env
|
||||
@@ -0,0 +1,7 @@
|
||||
m.yaoi.dog {
|
||||
reverse_proxy stalwart:8080
|
||||
}
|
||||
|
||||
mail.yaoi.dog {
|
||||
reverse_proxy bulwark:3000
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2.11-alpine
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "443:443/udp"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro,z
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
networks:
|
||||
- services
|
||||
|
||||
stalwart:
|
||||
image: stalwartlabs/stalwart:v0.16-alpine
|
||||
container_name: stalwart
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "25:25"
|
||||
- "465:465"
|
||||
- "993:993"
|
||||
- "4190:4190"
|
||||
environment:
|
||||
- STALWART_RECOVERY_ADMIN
|
||||
- STALWART_PUBLIC_URL
|
||||
volumes:
|
||||
- stalwart-etc:/etc/stalwart
|
||||
- stalwart-data:/var/lib/stalwart
|
||||
networks:
|
||||
- services
|
||||
|
||||
bulwark:
|
||||
image: ghcr.io/bulwarkmail/webmail:latest
|
||||
container_name: bulwark
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- JMAP_SERVER_URL=http://stalwart:8080
|
||||
- SESSION_SECRET
|
||||
depends_on:
|
||||
- stalwart
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"wget",
|
||||
"--no-verbose",
|
||||
"--tries=1",
|
||||
"--spider",
|
||||
"http://127.0.0.1:3000/api/health",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
volumes:
|
||||
- bulwark-settings:/app/data/settings
|
||||
- bulwark-config:/app/data/admin # rw during setup
|
||||
# - bulwark-config:/app/data/admin:ro # ro after setup
|
||||
- bulwark-state:/app/data/admin-state
|
||||
- bulwark-telemetry:/app/data/telemetry
|
||||
networks:
|
||||
- services
|
||||
|
||||
volumes:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
stalwart-etc:
|
||||
stalwart-data:
|
||||
bulwark-settings:
|
||||
bulwark-config:
|
||||
bulwark-state:
|
||||
bulwark-telemetry:
|
||||
|
||||
networks:
|
||||
services:
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
sudo -v
|
||||
|
||||
function banner_top() {
|
||||
echo -e "────┤ $1 ├────\n"
|
||||
}
|
||||
|
||||
function banner_bottom() {
|
||||
echo -e "\n────┤ $1 ├────\n\n\n"
|
||||
}
|
||||
|
||||
# https://patorjk.com/software/taag/#p=display&f=Small+Slant
|
||||
cat << 'EOF'
|
||||
__ __ _
|
||||
/ /_/ / (_)__ ___ ___ __
|
||||
/ __/ _ \/ / _ \/ _ `/ // /
|
||||
\__/_//_/_/_//_/\_, /\_, /
|
||||
/___//___/
|
||||
..... brought to you by futile
|
||||
|
||||
EOF
|
||||
|
||||
# configure dnf
|
||||
banner_top "configuring dnf"
|
||||
sudo tee /etc/dnf/dnf.conf << 'EOF'
|
||||
[main]
|
||||
defaultyes = True
|
||||
max_parallel_downloads = 10
|
||||
EOF
|
||||
banner_bottom "configured dnf"
|
||||
|
||||
# update system
|
||||
banner_top "updating system"
|
||||
sudo dnf update -y
|
||||
banner_bottom "updated system"
|
||||
|
||||
# install (& configure) docker
|
||||
banner_top "installing docker"
|
||||
sudo dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo --overwrite
|
||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
sudo usermod -aG docker $(id -un)
|
||||
sudo systemctl enable --now docker
|
||||
sudo docker run hello-world
|
||||
banner_bottom "installed docker"
|
||||
|
||||
# install (& configure) fish
|
||||
banner_top "installing fish"
|
||||
sudo dnf install -y fish
|
||||
sudo chsh -s $(which fish) $(id -un)
|
||||
fish -c "set -U fish_greeting"
|
||||
fish -c "set -Ux EDITOR $(which micro)"
|
||||
banner_bottom "installed fish"
|
||||
|
||||
# install misc
|
||||
banner_top "installing other packages"
|
||||
sudo dnf install -y micro btop fastfetch
|
||||
banner_bottom "installed other packages"
|
||||
|
||||
# finish
|
||||
banner_top "done! please log out and log back in"
|
||||
Reference in New Issue
Block a user