File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM oven/bun:1.1.29
2+
3+ RUN mkdir -p /etc/ssl/certs/
4+ RUN echo "$PGCERT" > /etc/ssl/certs/postgres.crt
5+ RUN chmod 600 /etc/ssl/certs/postgres.crt
6+ ENV PGCERT_PATH=/etc/ssl/certs/postgres.crt
7+
28WORKDIR /app
39COPY package.json bun.lockb ./
410RUN bun install --production
511COPY . .
612RUN bun --bun run build
7- CMD [ "bun" , "run" , ".output/server/index.mjs" ]
13+ CMD [ "bun" , "run" , ".output/server/index.mjs" ]
Original file line number Diff line number Diff line change 11import { drizzle } from 'drizzle-orm/node-postgres' ;
22import { Pool } from 'pg' ;
3+ import fs from 'node:fs' ;
34
45export const pool = new Pool ( {
56 user : process . env . PGUSER ,
67 host : process . env . PGHOST ,
78 database : process . env . PGDB ,
89 password : process . env . PGPASSWORD ,
910 port : + ( process . env . PGPORT || 5432 ) ,
10- ssl : true
11+ ssl : {
12+ rejectUnauthorized : true ,
13+ ca : fs . readFileSync ( process . env . PGCERT_PATH || '' ) . toString ( )
14+ }
1115} ) ;
1216
1317export const db = drizzle ( pool ) ;
You can’t perform that action at this time.
0 commit comments