diff --git a/docker-compose.yml b/docker-compose.yml index 25fa108..849fb33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ services: postgres: container_name: postgres - image: postgres:16.3-alpine3.19 - restart: always + image: postgres:16.4-alpine3.20 + restart: unless-stopped networks: - proxynet env_file: @@ -18,7 +18,6 @@ services: - "traefik.tcp.routers.postgresql.rule=HostSNI(`*`)" - "traefik.tcp.services.postgresql.loadbalancer.server.port=5432" - "traefik.tcp.routers.postgresql.entrypoints=postgres" - networks: proxynet: external: true \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..a6a38c9 --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#!/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 + +echo "Install postgres..." +cd /data/utils +bash global-env.sh POSTGRES_USER admin +bash global-env.sh POSTGRES_DB postgres +sudo bash env-gen.sh POSTGRES_PASSWORD +cd /data/postgres +sudo docker compose up -d + +trap - ERR +echo "Install postgres complete" \ No newline at end of file