Skip to content

Commit ec40d18

Browse files
committed
Added a utility command to docker compose to run psql
1 parent da28046 commit ec40d18

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

deploy/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ services:
101101
- /var/run/docker.sock:/var/run/docker.sock
102102
restart: unless-stopped
103103

104+
psql:
105+
image: postgres:18
106+
entrypoint: ["psql", "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-hackorum}"]
107+
env_file: .env
108+
depends_on:
109+
db:
110+
condition: service_healthy
111+
profiles: ["tools"]
112+
104113
volumes:
105114
pgdata:
106115
pgwal:

0 commit comments

Comments
 (0)