Last active
December 2, 2024 21:53
-
-
Save mortn/1c1706fff8913d409de2febbbe5de858 to your computer and use it in GitHub Desktop.
Postgres quadlet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSTGRES_PASSWORD=changeme | |
POSTGRES_DB=db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# psql -h localhost -U postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment