diff --git a/.gitignore b/.gitignore index fd497ad..94722e2 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,5 @@ next-env.d.ts /.idea /.convex -/.cursor \ No newline at end of file +/.cursor +/database \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d813efd..49ff601 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,13 @@ # To ensure security and compatibility, regularly update the NODE_VERSION ARG to the latest LTS version. ARG NODE_VERSION=24.13.0-slim +FROM node:${NODE_VERSION} AS runner-base + +RUN apt-get update && \ + apt-get install -y ffmpeg && \ + rm -rf /var/lib/apt/lists/* + + FROM node:${NODE_VERSION} AS dependencies # Set working directory @@ -46,6 +53,8 @@ COPY . . ENV NODE_ENV=production +ARG NEXT_PUBLIC_CONVEX_URL + # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. @@ -71,11 +80,7 @@ RUN if [ -f package-lock.json ]; then \ # Stage 3: Run Next.js application # ============================================ -FROM node:${NODE_VERSION} AS runner - -RUN apt-get update && \ - apt-get install -y ffmpeg && \ - rm -rf /var/lib/apt/lists/* +FROM runner-base AS runner # Set working directory WORKDIR /app diff --git a/README.md b/README.md index b77654b..034bf63 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,12 @@ services: - CONVEX_SELF_HOSTED_URL=http://127.0.0.1:3210 - CONVEX_SELF_HOSTED_ADMIN_KEY=REPLACE_ME restart: unless-stopped - image: git.abunchofknowitalls.com/joshuafhiggins/otunes:latest + image: otunes + build: + context: . + dockerfile: Dockerfile + args: + - NEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:3210 backend: stop_grace_period: 10s stop_signal: SIGINT