Skip to content

Commit dce8c2d

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

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ You have 2 ways how to run Postgresus:
22

33
# Installation
44

5-
**1) Install Postgresus via script.**
5+
**1) Install Postgresus via script (recommended, Linux only).**
66

77
It will:
8+
89
- install Docker with Docker Compose
910
- write docker-compose.yml config
1011
- install cron job to start Postgresus on system reboot
1112

1213
To install, run:
14+
1315
```
1416
apt-get install -y curl && \
1517
curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | bash
@@ -25,6 +27,10 @@ services:
2527
image: rostislavdugin/postgresus:latest
2628
ports:
2729
- "4005:4005"
30+
depends_on:
31+
postgresus-db:
32+
condition: service_healthy
33+
restart: unless-stopped
2834
2935
postgresus-db:
3036
image: postgres:17
@@ -36,11 +42,18 @@ services:
3642
- POSTGRES_PASSWORD=Q1234567
3743
volumes:
3844
- ./pgdata:/var/lib/postgresql/data
45+
- ./postgresus-data:/app/postgresus-data
3946
container_name: postgresus-db
4047
command: -p 5437
4148
shm_size: 10gb
49+
healthcheck:
50+
test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"]
51+
interval: 5s
52+
timeout: 5s
53+
retries: 5
54+
restart: unless-stopped
4255
```
4356

4457
# Usage
4558

46-
Go to http://localhost:4005 to see Postgresus UI
59+
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: 2 additions & 0 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

0 commit comments

Comments
 (0)