Clean up pgsql docker compose

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD 2026-01-23 22:04:11 -07:00
parent 1cdfbce0fa
commit 9ce2170a15
2 changed files with 13 additions and 18 deletions

View File

@ -1,9 +1,22 @@
---
services:
postgres:
image: postgres:18
restart: unless-stopped
environment:
POSTGRES_USER: "lubelogger"
POSTGRES_PASSWORD: "lubepass"
POSTGRES_DB: "lubelogger"
volumes:
- postgres:/var/lib/postgresql/
- /etc/localtime:/etc/localtime:ro
app:
image: ghcr.io/hargata/lubelogger:latest
restart: unless-stopped
environment:
POSTGRES_CONNECTION: "Host=postgres:5432;Username=lubelogger;Password=lubepass;Database=lubelogger;"
# volumes used to keep data persistent
volumes:
- data:/App/data
@ -12,18 +25,6 @@ services:
ports:
- 8080:8080
postgres:
image: postgres:14
restart: unless-stopped
environment:
POSTGRES_USER: "lubelogger"
POSTGRES_PASSWORD: "lubepass"
POSTGRES_DB: "lubelogger"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
volumes:
data:
keys:

View File

@ -1,6 +0,0 @@
DO $$
BEGIN
IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'app') THEN
CREATE SCHEMA app;
END IF;
END $$;