Skip to content

Instantly share code, notes, and snippets.

@mortn
Last active December 2, 2024 21:53
Show Gist options
  • Save mortn/1c1706fff8913d409de2febbbe5de858 to your computer and use it in GitHub Desktop.
Save mortn/1c1706fff8913d409de2febbbe5de858 to your computer and use it in GitHub Desktop.
Postgres quadlet
[Container]
Image=docker.io/postgres:latest
ContainerName=postgres
UserNS=keep-id:uid=999,gid=999
AutoUpdate=registry
PublishPort=5432:5432/tcp
Volume=%h/pgdata:/var/lib/postgresql/data
EnvironmentFile=%h/.config/containers/systemd/postgres.env
[Service]
Restart=always
[Install]
WantedBy=default.target
POSTGRES_PASSWORD=changeme
POSTGRES_DB=db
# psql -h localhost -U postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment