Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
Optimize docker iage
Khuram Niazf3a649e9373a
diff --git a/Dockerfile b/Dockerfileindex cc74d57..7d072f8 100644--- a/Dockerfile+++ b/Dockerfile@@ -24,14 +24,15 @@ WORKDIR /appCOPY --from=deps /app/node_modules ./node_modulesCOPY . .-# COPY ./prisma prisma/-# COPY ./src src-# Next.js collects completely anonymous telemetry data about general usage.# Learn more here: https://nextjs.org/telemetryENV NEXT_TELEMETRY_DISABLED 1ENV DATABASE_URL=file:/data/dev.db+# Add the wait script to ensure the database is ready before running migrations+ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait+RUN chmod +x /wait+# Generate Prisma clientRUN npx prisma generate@@ -46,7 +47,6 @@ RUN \FROM base AS runnerWORKDIR /app-ENV NODE_ENV production# Uncomment the following line in case you want to disable telemetry during runtime.ENV NEXT_TELEMETRY_DISABLED 1# Set environment variables@@ -62,23 +62,19 @@ ENV AUTH_TRUST_HOST: http://localhost:3000RUN addgroup --system --gid 1001 nodejs && \adduser --system --uid 1001 nextjs-# COPY --from=builder /app/public ./public-# Set the correct permission for prerender cacheRUN mkdir .nextRUN chown nextjs:nodejs .next-# Add the wait script to ensure the database is ready before running migrations-ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait-RUN chmod +x /wait-# Automatically leverage output traces to reduce image size# https://nextjs.org/docs/advanced-features/output-file-tracing-# COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./-# COPY --from=builder --chown=nextjs:nodejs /app/.next/docstatic ./.next/static-COPY --from=builder --chown=nextjs:nodejs /app /app+COPY --from=builder /app/public ./public+COPY --from=builder /app/prisma ./prisma+COPY --from=builder /app/src/lib/data ./src/lib/data+COPY --from=builder /app/node_modules/bcryptjs ./node_modules/bcryptjs+COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./+COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static-# Run the wait script, then run migrations and seed the databaseUSER nextjsEXPOSE 3000@@ -86,4 +82,4 @@ EXPOSE 3000ENV PORT 3000# Start the jobsync application-CMD /wait && npx prisma migrate deploy && npx prisma generate && npm run seed && npm start+CMD npx prisma migrate deploy && npm run seed && node server.jsdiff --git a/next.config.mjs b/next.config.mjsindex d5ffe88..8ac27d7 100644--- a/next.config.mjs+++ b/next.config.mjs@@ -1,14 +1,15 @@/** @type {import('next').NextConfig} */const nextConfig = {- async redirects() {- return [- {- source: '/',- destination: '/dashboard',- permanent: true,- },- ]+ async redirects() {+ return [+ {+ source: "/",+ destination: "/dashboard",+ permanent: true,},+ ];+ },+ output: "standalone",};export default nextConfig;diff --git a/prisma/seed.js b/prisma/seed.jsindex d4155ed..8ef35d7 100644--- a/prisma/seed.js+++ b/prisma/seed.js@@ -7,8 +7,8 @@ const prisma = new PrismaClient();async function seedUser() {try {- const password = await bcrypt.hash("password123", 10);- const email = "[email protected]";+ const password = await bcrypt.hash(process.env.USER_PASSWORD, 10);+ const email = process.env.USER_EMAIL;// Check if the user already existsconst existingUser = await prisma.user.findUnique({where: {