The recipes.blue monorepo recipes.blue
recipes appview atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add PUBLIC_DIR env var

+7 -6
+3 -4
Dockerfile
··· 9 9 RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile 10 10 RUN pnpm run -r build 11 11 RUN pnpm deploy --filter=@cookware/api --prod /prod/api 12 - COPY apps/web/dist /prod/web 13 12 14 13 FROM base AS api 15 - COPY --from=build /prod/api /prod/api 16 - COPY --from=build /usr/src/app/apps/web/dist /prod/api/public 17 - WORKDIR /prod/api 14 + COPY --from=build /prod/api /app 15 + COPY --from=build /usr/src/app/apps/web/dist /app/public 16 + WORKDIR /app 18 17 EXPOSE 8080 19 18 CMD [ "node", "dist/index.js" ]
+2
apps/api/src/config/env.ts
··· 4 4 PORT: z.coerce.number().lte(65535).default(8080), 5 5 HOST: z.string().ip().default('0.0.0.0'), 6 6 7 + PUBLIC_DIR: z.string().default('/app/public'), 8 + 7 9 CORS_ORIGINS: z.array(z.string()).default(['http://localhost:5173', 'https://cookware.dev.hayden.moe']), 8 10 9 11 TURSO_CONNECTION_URL: z.string().default('https://turso.dev.hayden.moe'),
+2 -2
apps/api/src/index.ts
··· 26 26 session_key_rotation: boolean, 27 27 }, 28 28 }>(); 29 - app.use('/assets/*', serveStatic({ root: './public' })); 29 + app.use('/assets/*', serveStatic({ root: env.PUBLIC_DIR })); 30 30 31 31 const store = new CookieStore({ 32 32 sessionCookieName: 'cookware-session', ··· 91 91 }); 92 92 93 93 app.use('/*', async ctx => { 94 - const html = readFileSync(path.join(import.meta.dirname, '..', 'public', 'index.html')).toString(); 94 + const html = readFileSync(path.join(env.PUBLIC_DIR, 'index.html')).toString(); 95 95 return ctx.html(html); 96 96 }); 97 97