Compare commits

...

2 Commits

Author SHA1 Message Date
4a02405e06 update main.sh 2025-10-25 13:35:33 +00:00
57f4fbe9f3 add watchtower 2025-10-25 13:27:43 +00:00
15 changed files with 320 additions and 273 deletions

View File

@@ -6,9 +6,11 @@ networks:
services:
caddy:
image: caddy:2.10.2-alpine
image: caddy:2-alpine
container_name: caddy
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- caddy
ports:
@@ -16,11 +18,11 @@ services:
- "80:80"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./Caddyfile.private:/etc/caddy/Caddyfile.private
- ./ssl:/etc/ssl/custom/
- ./data/data:/data
- ./data/config:/config
- ../private_volume:/private_volume
- ./Caddyfile:/etc/caddy/Caddyfile
- ./Caddyfile.private:/etc/caddy/Caddyfile.private
- ./ssl:/etc/ssl/custom/
- ./data/data:/data
- ./data/config:/config
- ../private_volume:/private_volume
env_file:
- ./.env

View File

@@ -1,6 +1,8 @@
services:
croc:
image: schollz/croc:10
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "9009-9013:9009-9013"
env_file: .env

View File

@@ -1,31 +1,33 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
ghost:
image: ghost:6-alpine
container_name: ghost
restart: unless-stopped
networks:
- caddy
environment:
# DB
database__client: sqlite3
database__connection__filename: content/data/ghost.db
# App
NODE_ENV: production
url: ${URL}
# Mail
mail__options__host: ${MAIL_HOST}
mail__options__port: ${MAIL_PORT}
mail__options__secure: ${MAIL_SECURE}
mail__options__auth__user: ${MAIL_USERNAME}
mail__options__auth__pass: ${MAIL_PASSWORD}
mail__from: ${MAIL_FROM}
mail__options__service: SMTP
mail__transport: SMTP
volumes:
- ./data:/var/lib/ghost/content
ghost:
image: ghost:6-alpine
container_name: ghost
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- caddy
environment:
# DB
database__client: sqlite3
database__connection__filename: content/data/ghost.db
# App
NODE_ENV: production
url: ${URL}
# Mail
mail__options__host: ${MAIL_HOST}
mail__options__port: ${MAIL_PORT}
mail__options__secure: ${MAIL_SECURE}
mail__options__auth__user: ${MAIL_USERNAME}
mail__options__auth__pass: ${MAIL_PASSWORD}
mail__from: ${MAIL_FROM}
mail__options__service: SMTP
mail__transport: SMTP
volumes:
- ./data:/var/lib/ghost/content

View File

@@ -8,8 +8,10 @@ networks:
services:
server:
image: gitea/gitea:1.24.6
image: gitea/gitea:1
container_name: gitea
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- USER_UID=${USER_UID}
- USER_GID=${USER_GID}
@@ -22,12 +24,12 @@ services:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
deploy:
resources:
limits:
memory: 1G
resources:
limits:
memory: 1G
act:
image: gitea/act_runner:0.2.11
image: gitea/act_runner:0.2.13
container_name: gitea_act
restart: unless-stopped
environment:

View File

@@ -1,26 +1,28 @@
networks:
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
grafana:
image: grafana/grafana-enterprise:12.2.0
container_name: grafana
restart: unless-stopped
networks:
- grafana
- caddy
volumes:
- grafana-data:/var/lib/grafana
- ./data/grafana/dashboards:/var/lib/grafana/dashboards
- ./data/provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./data/provisioning/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
grafana:
image: grafana/grafana-enterprise:12.2
container_name: grafana
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- grafana
- caddy
volumes:
- grafana-data:/var/lib/grafana
- ./data/grafana/dashboards:/var/lib/grafana/dashboards
- ./data/provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./data/provisioning/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
volumes:
grafana-data:
grafana-data:

View File

@@ -1,80 +1,82 @@
networks:
immich:
external: false
caddy:
name: caddy
driver: bridge
external: true
immich:
external: false
caddy:
name: caddy
driver: bridge
external: true
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:v2.1.0
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- "2283:2283"
depends_on:
- redis
- database
networks:
- immich
- caddy
deploy:
resources:
limits:
cpus: "1.5"
memory: 1G
restart: unless-stopped
healthcheck:
disable: false
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:v2
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
networks:
- immich
- caddy
deploy:
resources:
limits:
cpus: "1.5"
memory: 1G
restart: unless-stopped
healthcheck:
disable: false
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:release
volumes:
- model-cache:/cache
env_file:
- .env
networks:
- immich
# deploy:
# resources:
# limits:
# cpus: "1"
# memory: 600M
restart: unless-stopped
healthcheck:
disable: false
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:release
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- model-cache:/cache
env_file:
- .env
networks:
- immich
# deploy:
# resources:
# limits:
# cpus: "1"
# memory: 600M
restart: unless-stopped
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:facc1d2c3462975c34e10fccb167bfa92b0e0dbd992fc282c29a61c3243afb11
networks:
- immich
healthcheck:
test: redis-cli ping || exit 1
restart: unless-stopped
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:facc1d2c3462975c34e10fccb167bfa92b0e0dbd992fc282c29a61c3243afb11
networks:
- immich
healthcheck:
test: redis-cli ping || exit 1
restart: unless-stopped
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: "--data-checksums"
networks:
- immich
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
restart: unless-stopped
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: "--data-checksums"
networks:
- immich
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
restart: unless-stopped
volumes:
model-cache:
model-cache:

48
main.sh
View File

@@ -77,7 +77,7 @@ start_services() {
docker network create gitea 2>/dev/null
echo "Starting prometheus..."
$DOCKER_COMPOSE_COMMAND -f ./prometheus/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./prometheus/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Prometheus started successfully."
else
@@ -86,7 +86,7 @@ start_services() {
fi
echo "Starting Grafana..."
$DOCKER_COMPOSE_COMMAND -f ./grafana/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./grafana/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Grafana started successfully."
else
@@ -95,7 +95,7 @@ start_services() {
fi
echo "Starting Gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Gitea started successfully."
else
@@ -104,7 +104,7 @@ start_services() {
fi
echo "Starting gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Gitea started successfully."
else
@@ -113,7 +113,7 @@ start_services() {
fi
echo "Starting memos..."
$DOCKER_COMPOSE_COMMAND -f ./memos/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./memos/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Memos started successfully."
else
@@ -122,7 +122,7 @@ start_services() {
fi
echo "Starting sftpgo..."
$DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Sftpgo started successfully."
else
@@ -131,7 +131,7 @@ start_services() {
fi
echo "Starting slash..."
$DOCKER_COMPOSE_COMMAND -f ./slash/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./slash/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Slash started successfully."
else
@@ -140,7 +140,7 @@ start_services() {
fi
echo "Starting vaultwarden..."
$DOCKER_COMPOSE_COMMAND -f ./vaultwarden/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./vaultwarden/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Vaultwarden started successfully."
else
@@ -149,7 +149,7 @@ start_services() {
fi
echo "Starting wg-easy..."
$DOCKER_COMPOSE_COMMAND -f ./wg_easy/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./wg_easy/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Wg-easy started successfully."
else
@@ -158,7 +158,7 @@ start_services() {
fi
echo "Starting glance..."
$DOCKER_COMPOSE_COMMAND -f ./glance/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./glance/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Glance started successfully."
else
@@ -167,7 +167,7 @@ start_services() {
fi
echo "Starting ghost..."
$DOCKER_COMPOSE_COMMAND -f ./ghost/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./ghost/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Ghost started successfully."
else
@@ -176,7 +176,7 @@ start_services() {
fi
echo "Starting immich..."
$DOCKER_COMPOSE_COMMAND -f ./immich/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./immich/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Immich started successfully."
else
@@ -185,7 +185,7 @@ start_services() {
fi
echo "Starting uptime kuma..."
$DOCKER_COMPOSE_COMMAND -f ./uptime_kuma/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./uptime_kuma/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Uptime kuma started successfully."
else
@@ -194,7 +194,7 @@ start_services() {
fi
echo "Starting croc..."
$DOCKER_COMPOSE_COMMAND -f ./croc/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./croc/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Croc started successfully."
else
@@ -203,13 +203,22 @@ start_services() {
fi
echo "Starting caddy..."
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up -d
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Caddy started successfully."
else
print_error "failed to start Caddy!"
exit 1
fi
echo "Starting watchtower..."
$DOCKER_COMPOSE_COMMAND -f ./watchtower/docker-compose.yml up --pull -d
if [ $? -eq 0 ]; then
print_success "Watchtower started successfully."
else
print_error "failed to start Watchtower!"
exit 1
fi
}
stop_services() {
@@ -347,6 +356,15 @@ stop_services() {
print_error "failed to stop Caddy!"
exit 1
fi
echo "Stopping watchtower..."
$DOCKER_COMPOSE_COMMAND -f ./watchtower/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Watchtower stopped successfully."
else
print_error "failed to stop Watchtower!"
exit 1
fi
}
if [ $# -lt 1 ]; then

View File

@@ -1,16 +0,0 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
memos:
image: neosmemo/memos:0.25
container_name: memos
volumes:
- ./data/app:/var/opt/memos
ports:
- 5230:5230
networks:
- caddy

16
memos/docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
memos:
image: neosmemo/memos:0.25
container_name: memos
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- ./data/app:/var/opt/memos
networks:
- caddy

View File

@@ -1,58 +1,58 @@
networks:
prometheus:
external: false
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
prometheus:
external: false
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
prometheus:
image: prom/prometheus:v3.7.2
container_name: prometheus
restart: unless-stopped
networks:
- prometheus
- grafana
- caddy
command: "--config.file=/etc/prometheus/prometheus.yaml --storage.tsdb.retention.time=10d --storage.tsdb.retention.size=15GB"
volumes:
- ./data/config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
- prometheus-data:/prometheus
prometheus:
image: prom/prometheus:v3.7.2
container_name: prometheus
restart: unless-stopped
networks:
- prometheus
- grafana
- caddy
command: "--config.file=/etc/prometheus/prometheus.yaml --storage.tsdb.retention.time=10d --storage.tsdb.retention.size=15GB"
volumes:
- ./data/config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
- prometheus-data:/prometheus
node_exporter:
image: quay.io/prometheus/node-exporter:v1.9.1
container_name: node_exporter
restart: unless-stopped
networks:
- prometheus
command:
- "--path.rootfs=/host"
pid: host
volumes:
- "/:/host:ro,rslave"
node_exporter:
image: quay.io/prometheus/node-exporter:v1.10.0
container_name: node_exporter
restart: unless-stopped
networks:
- prometheus
command:
- "--path.rootfs=/host"
pid: host
volumes:
- "/:/host:ro,rslave"
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: cadvisor
restart: unless-stopped
networks:
- prometheus
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:ro"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
privileged: true
devices:
- "/dev/kmsg:/dev/kmsg"
command:
- --disable_metrics=advtcp,cpu_topology,cpuset,hugetlb,memory_numa,process,referenced_memory,resctrl,sched,tcp,udp,percpu,disk,diskIO,oom_event,perf_event
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.52.1
container_name: cadvisor
restart: unless-stopped
networks:
- prometheus
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:ro"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
privileged: true
devices:
- "/dev/kmsg:/dev/kmsg"
command:
- --disable_metrics=advtcp,cpu_topology,cpuset,hugetlb,memory_numa,process,referenced_memory,resctrl,sched,tcp,udp,percpu,disk,diskIO,oom_event,perf_event
volumes:
prometheus-data:
prometheus-data:

View File

@@ -6,9 +6,11 @@ networks:
services:
server:
image: drakkan/sftpgo:v2.6.6
image: drakkan/sftpgo:v2
container_name: sftpgo
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- SFTPGO_COMMON_IDLE_TIMEOUT=${SFTPGO_COMMON_IDLE_TIMEOUT}
- SFTPGO_COMMON_UPLOAD_MODE=${SFTPGO_COMMON_UPLOAD_MODE}

View File

@@ -6,7 +6,7 @@ networks:
services:
server:
# image: yourselfhosted/slash:latest
# image: yourselfhosted/slash:latest
image: aykhans/slash:1.0.0-rc.0-e
container_name: slash
restart: unless-stopped

View File

@@ -1,19 +1,20 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
uptime-kuma:
image: louislam/uptime-kuma:2
container_name: uptime_kuma
restart: unless-stopped
volumes:
- ./data/app:/app/data
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- caddy
labels:
caddy: ${CADDY_DOMAIN}
caddy.reverse_proxy: "* {{upstreams 3001}}"
uptime-kuma:
image: louislam/uptime-kuma:2
container_name: uptime_kuma
restart: unless-stopped
volumes:
- ./data/app:/app/data
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- caddy
labels:
caddy: ${CADDY_DOMAIN}
caddy.reverse_proxy: "* {{upstreams 3001}}"
com.centurylinklabs.watchtower.enable: true

View File

@@ -0,0 +1,12 @@
services:
watchtower:
image: nickfedor/watchtower:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- "--label-enable"
- "--cleanup"
- "--rolling-restart"
- "--interval"
- "600" # 10 minutes

View File

@@ -1,43 +1,45 @@
services:
wg-easy:
image: ghcr.io/wg-easy/wg-easy:15
container_name: wg-easy
networks:
caddy:
interface_name: wgeth1
wg:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
interface_name: wgeth0
environment:
WG_DEVICE: wgeth0
volumes:
- ./data:/etc/wireguard
- /lib/modules:/lib/modules:ro
ports:
- "51820:51820/udp"
# - "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1
wg-easy:
image: ghcr.io/wg-easy/wg-easy:15
container_name: wg-easy
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
caddy:
interface_name: wgeth1
wg:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
interface_name: wgeth0
environment:
WG_DEVICE: wgeth0
volumes:
- ./data:/etc/wireguard
- /lib/modules:/lib/modules:ro
ports:
- "51820:51820/udp"
# - "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1
networks:
caddy:
name: caddy
driver: bridge
external: true
wg:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64
caddy:
name: caddy
driver: bridge
external: true
wg:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64