Skip to content

Commit

Permalink
chore: create separate db for svix
Browse files Browse the repository at this point in the history
  • Loading branch information
GAlexIHU committed Aug 27, 2024
1 parent 0f1641d commit 178786b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./etc/postgres-init:/docker-entrypoint-initdb.d/
command:
- "postgres"
- "-c"
Expand All @@ -107,7 +109,7 @@ services:
environment:
WAIT_FOR: "true" # We want to wait for the default services
SVIX_REDIS_DSN: "redis://redis:6379"
SVIX_DB_DSN: "postgresql://postgres:postgres@postgres/postgres"
SVIX_DB_DSN: "postgresql://svix:svix@postgres/svix"
SVIX_CACHE_TYPE: "redis"
SVIX_JWT_SECRET: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MjI5NzYyNzMsImV4cCI6MjAzODMzNjI3MywibmJmIjoxNzIyOTc2MjczLCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.PomP6JWRI62W5N4GtNdJm2h635Q5F54eij0J3BU-_Ds"
SVIX_LOG_LEVEL: "info"
Expand Down
5 changes: 5 additions & 0 deletions etc/postgres-init/svix.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE USER svix WITH PASSWORD 'svix';

CREATE DATABASE svix;

GRANT ALL PRIVILEGES ON DATABASE svix TO svix;

0 comments on commit 178786b

Please sign in to comment.