mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-05-08 09:38:55 -04:00
feat: update Dockerfile and docker-compose.yml to use WEB_PORT variable and streamline migration process
This commit is contained in:
+5
-3
@@ -16,7 +16,7 @@ ENV NODE_ENV=production \
|
||||
BETTER_AUTH_URL=http://localhost:3000 \
|
||||
AUTH_SECRET=docker-build-placeholder-secret-do-not-use \
|
||||
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
|
||||
RUN bun run build
|
||||
RUN bun run build && bun build src/server/db/migrate.ts --target=bun --outfile=migrate.js
|
||||
|
||||
FROM base AS release
|
||||
ENV NODE_ENV=production \
|
||||
@@ -26,9 +26,11 @@ ENV NODE_ENV=production \
|
||||
COPY --from=build /usr/src/app/.next/standalone ./
|
||||
COPY --from=build /usr/src/app/.next/static ./.next/static
|
||||
COPY --from=build /usr/src/app/public ./public
|
||||
COPY --from=build /usr/src/app/src/server/db/migrate.ts ./src/server/db/migrate.ts
|
||||
COPY --from=build /usr/src/app/migrate.js ./migrate.js
|
||||
COPY --from=build /usr/src/app/drizzle ./drizzle
|
||||
|
||||
RUN chmod -R a+rX drizzle migrate.js public
|
||||
|
||||
USER bun
|
||||
EXPOSE 3000
|
||||
CMD ["bun", "server.js"]
|
||||
CMD ["sh", "-c", "bun migrate.js && bun server.js"]
|
||||
|
||||
Reference in New Issue
Block a user