fix docker builds but for real
This commit is contained in:
parent
7e80f35846
commit
a04867d4c7
|
@ -57,4 +57,4 @@ ENV HOSTNAME "0.0.0.0"
|
||||||
|
|
||||||
# server.js is created by next build from the standalone output
|
# server.js is created by next build from the standalone output
|
||||||
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "start"]
|
|
@ -1,4 +1,6 @@
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {}
|
const nextConfig = {
|
||||||
|
output: "standalone"
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig;
|
||||||
|
|
|
@ -2,11 +2,14 @@ import sqlite from "sqlite3";
|
||||||
import bcrypt from "bcryptjs";
|
import bcrypt from "bcryptjs";
|
||||||
|
|
||||||
const { CREDENTIALS_DB_PATH } = process.env;
|
const { CREDENTIALS_DB_PATH } = process.env;
|
||||||
if (!CREDENTIALS_DB_PATH) {
|
|
||||||
throw "$CREDENTIALS_DB_PATH not provided; unable to connect to database";
|
|
||||||
}
|
|
||||||
|
|
||||||
export const database = () => new sqlite.Database(CREDENTIALS_DB_PATH!);
|
export const database = () => {
|
||||||
|
if (!CREDENTIALS_DB_PATH) {
|
||||||
|
throw "$CREDENTIALS_DB_PATH not provided; unable to connect to database";
|
||||||
|
}
|
||||||
|
|
||||||
|
return new sqlite.Database(CREDENTIALS_DB_PATH!);
|
||||||
|
};
|
||||||
|
|
||||||
export function validateCredentials(email: string, password: string) {
|
export function validateCredentials(email: string, password: string) {
|
||||||
const db = database();
|
const db = database();
|
||||||
|
|
Loading…
Reference in a new issue