diff --git a/docker-compose.yml b/docker-compose.yml index 9939526..dd93987 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ services: traefik: container_name: traefik - image: traefik:v3.0.1 - restart: always + image: traefik:v3.1.2 + restart: unless-stopped env_file: - /data/secrets/${SERVER_DOMAIN}/${SERVER_DOMAIN}.env command: diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..3532b69 --- /dev/null +++ b/install.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ "$(id -u)" != "0" ]; then + echo -e "\033[31mThis script requires superuser rights.\033[0m" + exit 0 +fi + +trap 'echo -e "\033[31minstall.sh: Something went wrong\033[0m"; exit 1' ERR +set -e + +export DEBIAN_FRONTEND=noninteractive + +SECRETS_PATH=/data/secrets/$SERVER_DOMAIN/$SERVER_DOMAIN.env +source $SECRETS_PATH + +echo "Install traefik..." +cd /data/utils +bash global-env.sh TRAEFIK_LOG_LEVEL $TRAEFIKLOGLEVEL +cd /data/traefik +sudo docker compose up -d + +trap - ERR +echo "Install traefik complete" \ No newline at end of file