Skip to content

Commit add4021

Browse files
committed
Attempt a Docker fix one more time
oh my god i'm losing my sanity
1 parent d259827 commit add4021

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
5454

5555
# copy my little start script (for migrating the database)
5656
COPY --from=builder --chown=nextjs:nodejs /app/docker-start.sh ./
57-
COPY --from=builder --chown=nextjs:nodejs /app/drizzle.config.ts ./
57+
COPY --from=builder --chown=nextjs:nodejs /app/drizzle.config.prod.ts ./
5858

5959
USER nextjs
6060

6161
EXPOSE 3000
6262
ENV PORT 3000
6363
ENV HOSTNAME "0.0.0.0"
64-
LABEL org.opencontainers.image.source="https://github.com/aelithron/visiorganize"
64+
LABEL org.opencontainers.image.source="https://github.com/aelithron/booklink"
6565

6666
# server.js is created by next build from the standalone output
6767
# https://nextjs.org/docs/pages/api-reference/next-config-js/output

docker-start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
echo "Migrating the database..."
3-
npx drizzle-kit push
3+
npx drizzle-kit push --config ./drizzle.config.prod.ts
44
echo "Starting the app..."
55
node server.js

drizzle.config.prod.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'drizzle-kit';
2+
3+
export default defineConfig({
4+
out: './drizzle',
5+
schema: './db/schema.ts',
6+
dialect: 'postgresql',
7+
dbCredentials: {
8+
url: process.env.DATABASE_URL!,
9+
},
10+
});

0 commit comments

Comments
 (0)