added postgres & made structure changes

This commit is contained in:
Amar Saljic
2025-11-02 08:39:40 +01:00
parent f272c00ff3
commit 55a12e0fb7
10 changed files with 234 additions and 119 deletions

View File

@ -0,0 +1,18 @@
secrets:
postgres_password:
environment: POSTGRES_PASSWORD
postgres_user:
environment: POSTGRES_USER
services:
postgres:
image: postgres:18
container_name: postgres
user: "1002"
restart: always
shm_size: 1024mb
environment:
POSTGRES_USER_FILE: /run/secrets/postgres_user
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets: ['postgres_password', 'postgres_user']
ports: ['5432:5432']
volumes: ['./data:/var/lib/postgresql']