Skip to content

Commit

Permalink
refactor: inline Svix database init SQL script
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgacsal committed Oct 4, 2024
1 parent 3987bb5 commit c7a31b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 11 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./etc/postgres-init:/docker-entrypoint-initdb.d/
configs:
- source: svix_sql
target: /docker-entrypoint-initdb.d/svix.sql
command: ["postgres", "-c", "wal_level=logical"]
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "$${POSTGRES_DB}", "-U", "$${POSTGRES_USER}"]
Expand All @@ -134,3 +135,11 @@ services:
depends_on:
- postgres
- redis

configs:
svix_sql:
content: |
CREATE USER svix WITH PASSWORD 'svix';
CREATE DATABASE svix;
GRANT ALL PRIVILEGES ON DATABASE svix TO svix;
ALTER DATABASE svix OWNER TO svix;
7 changes: 0 additions & 7 deletions etc/postgres-init/svix.sql

This file was deleted.

0 comments on commit c7a31b5

Please sign in to comment.