i hope this works

This commit is contained in:
Akis 2022-12-31 15:18:41 +02:00
parent 2632b2fd2b
commit 481fc2bc3f
Signed by untrusted user: akis
GPG Key ID: 267BF5C6677944ED
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,8 @@
AUTH_SECRET=myauthsecret # generate with https://generate-secret.vercel.app/32 or openssl rand -hex 32 on unix-like AUTH_SECRET=myauthsecret # generate with https://generate-secret.vercel.app/32 or openssl rand -hex 32 on unix-like
DB_URL=postgres://user:pass@localhost:5432/website DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=your-db-password
AUTH_CLIENT_ID=your-authentik-client-id AUTH_CLIENT_ID=your-authentik-client-id
AUTH_CLIENT_SECRET=your-authentik-client-secret AUTH_CLIENT_SECRET=your-authentik-client-secret
AUTH_ISSUER=https://authentik-domain/application/o/app-name/ AUTH_ISSUER=https://authentik-domain/application/o/app-name/

View File

@ -2,8 +2,13 @@ import { Sequelize, DataTypes } from "sequelize";
import consola from "consola"; import consola from "consola";
import { env } from "$env/dynamic/private"; import { env } from "$env/dynamic/private";
const sequelize = new Sequelize(env.DB_URL, { const sequelize = new Sequelize({
dialect: "postgres" database: "website",
password: String(env.DB_PASSWORD),
port: Number(env.DB_PORT),
host: String(env.DB_HOST),
dialect: "postgres",
username: String(env.DB_USERNAME),
}); });
sequelize.define("Announcements", { sequelize.define("Announcements", {