Fix database connector, use alpine node image
This commit is contained in:
parent
3e47e2e900
commit
2df11c8091
@ -1,5 +1,5 @@
|
||||
# Build the application with a specific environment
|
||||
FROM node:20 AS builder
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
@ -9,7 +9,7 @@ RUN npm ci
|
||||
RUN npm run build
|
||||
|
||||
# Create the executor image
|
||||
FROM node:20
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { drizzle } from 'drizzle-orm/mysql2';
|
||||
import mysql from 'mysql2/promise';
|
||||
import * as schema from './schema';
|
||||
|
||||
const { DATABASE_DB, DATABASE_HOST, DATABASE_PASS } = env;
|
||||
const { DATABASE_DB, DATABASE_HOST, DATABASE_PASS, DATABASE_USER } = env;
|
||||
|
||||
export class DB {
|
||||
static mysqlConnection: mysql.Connection;
|
||||
@ -12,7 +12,7 @@ export class DB {
|
||||
static async init() {
|
||||
DB.mysqlConnection = await mysql.createConnection({
|
||||
host: DATABASE_HOST,
|
||||
user: DATABASE_PASS,
|
||||
user: DATABASE_USER,
|
||||
password: DATABASE_PASS,
|
||||
database: DATABASE_DB
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user