Files
app/make-top-level-docker-compose.sh

45 lines
753 B
Bash
Raw Normal View History

#!/bin/bash
set -e
. $1 # source the apps.config file with then env vars
read -r -a APP_CONFIGS <<< "$APP_CONFIGS"
cat <<'EOF'
2025-08-16 15:50:14 -07:00
services:
lb:
2026-06-22 16:38:56 -07:00
image: docker.io/caddy:2.11.4-alpine
2026-07-03 10:14:03 -07:00
env_file:
- ./lb/lb.env
2025-08-16 15:50:14 -07:00
volumes:
- ./lb/:/etc/caddy
- /nassella/lb/config:/config
- /nassella/lb/data:/data
- /app/maintenance:/maintenance
2025-08-16 15:50:14 -07:00
networks:
lb:
aliases:
EOF
for config_string in ${APP_CONFIGS[@]}; do
IFS=','
read -r -a config <<< "$config_string"
subdomain=${config[1]}
echo " - $subdomain.$ROOT_DOMAIN"
done
cat <<'EOF'
2025-08-16 15:50:14 -07:00
restart: unless-stopped
ports:
- "443:443"
- "80:80"
networks:
lb:
2026-07-04 12:54:54 -07:00
ipam:
config:
- subnet: 172.30.0.0/16
EOF