Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FEATURE (build): Update installation volumes

Rostislav Duginb61364e2ad90
diff --git a/README.md b/README.md
index afe8b662..31a1dcf7 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,18 @@
-You have 2 ways how to run Postgresus:
# Installation
-**1) Install Postgresus via script.**
+You have 2 ways how to run Postgresus: install via script or manually write docker-compose.yml config.
+
+**1) Install Postgresus via script (recommended, Linux only).**
It will:
+
- install Docker with Docker Compose
- write docker-compose.yml config
- install cron job to start Postgresus on system reboot
To install, run:
+
```
apt-get install -y curl && \
curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | bash
@@ -25,6 +28,10 @@ services:
image: rostislavdugin/postgresus:latest
ports:
- "4005:4005"
+ depends_on:
+ postgresus-db:
+ condition: service_healthy
+ restart: unless-stopped
postgresus-db:
image: postgres:17
@@ -36,11 +43,18 @@ services:
- POSTGRES_PASSWORD=Q1234567
volumes:
- ./pgdata:/var/lib/postgresql/data
+ - ./postgresus-data:/app/postgresus-data
container_name: postgresus-db
command: -p 5437
shm_size: 10gb
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"]
+ interval: 5s
+ timeout: 5s
+ retries: 5
+ restart: unless-stopped
```
# Usage
-Go to http://localhost:4005 to see Postgresus UI
\ No newline at end of file
+Go to http://localhost:4005 to see Postgresus UI
diff --git a/docker-compose.yml.example b/docker-compose.yml.example
index ffabb231..8a8884eb 100644
--- a/docker-compose.yml.example
+++ b/docker-compose.yml.example
@@ -13,6 +13,8 @@ services:
dockerfile: Dockerfile
ports:
- "4005:4005"
+ volumes:
+ - ./postgresus-data:/app/postgresus-data
depends_on:
postgresus-db:
condition: service_healthy
@@ -24,8 +26,8 @@ services:
# PostgreSQL ports so it is safe
environment:
- POSTGRES_DB=postgresus
- - POSTGRES_USER=postgresus
- - POSTGRES_PASSWORD=postgresus
+ - POSTGRES_USER=postgres
+ - POSTGRES_PASSWORD=Q1234567
volumes:
- ./pgdata:/var/lib/postgresql/data
container_name: postgresus-db
diff --git a/install-postgresus.sh b/install-postgresus.sh
index 1e86655f..296bafd1 100644
--- a/install-postgresus.sh
+++ b/install-postgresus.sh
@@ -59,6 +59,8 @@ services:
image: rostislavdugin/postgresus:latest
ports:
- "4005:4005"
+ volumes:
+ - ./postgresus-data:/app/postgresus-data
depends_on:
postgresus-db:
condition: service_healthy
@@ -70,8 +72,8 @@ services:
# PostgreSQL ports so it is safe
environment:
- POSTGRES_DB=postgresus
- - POSTGRES_USER=postgresus
- - POSTGRES_PASSWORD=postgresus
+ - POSTGRES_USER=postgres
+ - POSTGRES_PASSWORD=Q1234567
volumes:
- ./pgdata:/var/lib/postgresql/data
container_name: postgresus-db
@@ -106,6 +108,6 @@ log "Cron job configured successfully"
log "PostgresUS installation completed successfully!"
log "-------------------------------------------"
log "To launch immediately:"
-log "> cd $INSTALL_DIR && docker-compose up -d"
+log "> cd $INSTALL_DIR && docker compose up -d"
log "Or reboot system to auto-start via cron"
log "Access PostgresUS at: http://localhost:4005"
\ No newline at end of file