2026-03-12 21:01:38
This commit is contained in:
34
tiddlywiki/postgresql with Docker.txt
Executable file
34
tiddlywiki/postgresql with Docker.txt
Executable file
@@ -0,0 +1,34 @@
|
||||
mkdir -p /app/persistent_docker/postgres/data
|
||||
cd /app/persistent_docker/postgres
|
||||
|
||||
cat docker-compose.yaml
|
||||
# Use postgres/example user/password credentials
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: secret
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
- /app/persistent_docker/postgres/data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
docker-compose up -d
|
||||
docker update --restart unless-stopped $(docker ps -q)
|
||||
|
||||
# adminer URL: http://192.168.0.91:8080/
|
||||
# connect from remote machine
|
||||
psql -h socorro -U postgres -d postgres
|
||||
|
||||
|
||||
Reference in New Issue
Block a user