Skip to content

Commit

Permalink
fixed notifications, pglite -> postgres in a docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishtar committed Jul 2, 2024
1 parent f78682a commit c18230b
Show file tree
Hide file tree
Showing 49 changed files with 16,557 additions and 4,775 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ EXPRESS_PORT=
TONAPI_TOKEN=
NOTIFICATION_RATE_UP=2
NOTIFICATION_RATE_DOWN=0.5
# PostgreSQL
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_USER=username
POSTGRES_PASSWORD=password
POSTGRES_DB=default_database
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
postgres:
image: postgres:latest
env_file:
- .env
ports:
- 5432:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data/
8 changes: 7 additions & 1 deletion drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import process from 'process';
import 'dotenv/config'
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
schema: './src/db/schema/index.ts',
out: './src/db/migrations',
dialect: 'postgresql',
dbCredentials: {
url: 'file://data/postgresql',
host: process.env.POSTGRES_HOST,
port: Number(process.env.POSTGRES_PORT),
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DATABASE!,
},
});
Loading

0 comments on commit c18230b

Please sign in to comment.