Skip to content

Commit b61364e

Browse files
FEATURE (build): Update installation volumes
1 parent f394c9d commit b61364e

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
You have 2 ways how to run Postgresus:
21

32
# Installation
43

5-
**1) Install Postgresus via script.**
4+
You have 2 ways how to run Postgresus: install via script or manually write docker-compose.yml config.
5+
6+
**1) Install Postgresus via script (recommended, Linux only).**
67

78
It will:
9+
810
- install Docker with Docker Compose
911
- write docker-compose.yml config
1012
- install cron job to start Postgresus on system reboot
1113

1214
To install, run:
15+
1316
```
1417
apt-get install -y curl && \
1518
curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | bash
@@ -25,6 +28,10 @@ services:
2528
image: rostislavdugin/postgresus:latest
2629
ports:
2730
- "4005:4005"
31+
depends_on:
32+
postgresus-db:
33+
condition: service_healthy
34+
restart: unless-stopped
2835
2936
postgresus-db:
3037
image: postgres:17
@@ -36,11 +43,18 @@ services:
3643
- POSTGRES_PASSWORD=Q1234567
3744
volumes:
3845
- ./pgdata:/var/lib/postgresql/data
46+
- ./postgresus-data:/app/postgresus-data
3947
container_name: postgresus-db
4048
command: -p 5437
4149
shm_size: 10gb
50+
healthcheck:
51+
test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"]
52+
interval: 5s
53+
timeout: 5s
54+
retries: 5
55+
restart: unless-stopped
4256
```
4357

4458
# Usage
4559

46-
Go to http://localhost:4005 to see Postgresus UI
60+
Go to http://localhost:4005 to see Postgresus UI

docker-compose.yml.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ services:
1313
dockerfile: Dockerfile
1414
ports:
1515
- "4005:4005"
16+
volumes:
17+
- ./postgresus-data:/app/postgresus-data
1618
depends_on:
1719
postgresus-db:
1820
condition: service_healthy
@@ -24,8 +26,8 @@ services:
2426
# PostgreSQL ports so it is safe
2527
environment:
2628
- POSTGRES_DB=postgresus
27-
- POSTGRES_USER=postgresus
28-
- POSTGRES_PASSWORD=postgresus
29+
- POSTGRES_USER=postgres
30+
- POSTGRES_PASSWORD=Q1234567
2931
volumes:
3032
- ./pgdata:/var/lib/postgresql/data
3133
container_name: postgresus-db

install-postgresus.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ services:
5959
image: rostislavdugin/postgresus:latest
6060
ports:
6161
- "4005:4005"
62+
volumes:
63+
- ./postgresus-data:/app/postgresus-data
6264
depends_on:
6365
postgresus-db:
6466
condition: service_healthy
@@ -70,8 +72,8 @@ services:
7072
# PostgreSQL ports so it is safe
7173
environment:
7274
- POSTGRES_DB=postgresus
73-
- POSTGRES_USER=postgresus
74-
- POSTGRES_PASSWORD=postgresus
75+
- POSTGRES_USER=postgres
76+
- POSTGRES_PASSWORD=Q1234567
7577
volumes:
7678
- ./pgdata:/var/lib/postgresql/data
7779
container_name: postgresus-db
@@ -106,6 +108,6 @@ log "Cron job configured successfully"
106108
log "PostgresUS installation completed successfully!"
107109
log "-------------------------------------------"
108110
log "To launch immediately:"
109-
log "> cd $INSTALL_DIR && docker-compose up -d"
111+
log "> cd $INSTALL_DIR && docker compose up -d"
110112
log "Or reboot system to auto-start via cron"
111113
log "Access PostgresUS at: http://localhost:4005"

0 commit comments

Comments
 (0)