autocommit

This commit is contained in:
leo 2024-08-31 02:26:15 +05:00
parent 789f243588
commit 677095d05c
2 changed files with 24 additions and 3 deletions

View File

@ -1,8 +1,8 @@
services: services:
postgres: postgres:
container_name: postgres container_name: postgres
image: postgres:16.3-alpine3.19 image: postgres:16.4-alpine3.20
restart: always restart: unless-stopped
networks: networks:
- proxynet - proxynet
env_file: env_file:
@ -18,7 +18,6 @@ services:
- "traefik.tcp.routers.postgresql.rule=HostSNI(`*`)" - "traefik.tcp.routers.postgresql.rule=HostSNI(`*`)"
- "traefik.tcp.services.postgresql.loadbalancer.server.port=5432" - "traefik.tcp.services.postgresql.loadbalancer.server.port=5432"
- "traefik.tcp.routers.postgresql.entrypoints=postgres" - "traefik.tcp.routers.postgresql.entrypoints=postgres"
networks: networks:
proxynet: proxynet:
external: true external: true

22
install.sh Normal file
View File

@ -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"