Add infra/docker-compose.yml for shared postgres stack
Some checks failed
Deploy to NAS / deploy (push) Has been cancelled
Some checks failed
Deploy to NAS / deploy (push) Has been cancelled
Move compose config from README into its own file; README now references it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,27 +26,10 @@ Synology NAS
|
|||||||
sudo mkdir -p /volume2/docker/shared/pgdata
|
sudo mkdir -p /volume2/docker/shared/pgdata
|
||||||
```
|
```
|
||||||
|
|
||||||
### docker-compose.yml anlegen
|
### docker-compose.yml kopieren
|
||||||
|
|
||||||
Datei `/volume2/docker/shared/docker-compose.yml`:
|
```bash
|
||||||
|
sudo cp infra/docker-compose.yml /volume2/docker/shared/docker-compose.yml
|
||||||
```yaml
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "5433:5432"
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
|
||||||
volumes:
|
|
||||||
- /volume2/docker/shared/pgdata:/var/lib/postgresql/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### .env anlegen
|
### .env anlegen
|
||||||
|
|||||||
16
infra/docker-compose.yml
Normal file
16
infra/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5433:5432"
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
||||||
|
volumes:
|
||||||
|
- /volume2/docker/shared/pgdata:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
Reference in New Issue
Block a user