Compare commits

...

3 Commits

Author SHA1 Message Date
e9ecd33362 Merge pull request 'feat/better-deploy' (#2) from feat/better-deploy into main
Some checks failed
Update Memento Dev on VPS / deploy (push) Has been cancelled
Reviewed-on: #2
2025-04-17 12:32:06 +00:00
38cf6ecd85 refactor: Remove unused prerender logic from config and pages 2025-04-17 14:28:39 +02:00
d8d38c1cb5 feat: Add production Docker configuration for memento service 2025-04-17 14:06:24 +02:00
6 changed files with 29 additions and 15 deletions

View File

@ -22,8 +22,6 @@ export default {
bodyAttributes: { bodyAttributes: {
class: "flex min-h-full bg-white dark:bg-slate-900", class: "flex min-h-full bg-white dark:bg-slate-900",
}, },
prerender: true,
prefetchStaticAssets: "hover", prefetchStaticAssets: "hover",
extends: vikeReact, extends: vikeReact,

View File

@ -1,6 +0,0 @@
import { docsService } from "@/services/DocsService";
export async function onBeforePrerenderStart() {
const allDocumentations = await docsService.getUrls("certifications");
return allDocumentations;
}

View File

@ -1,6 +0,0 @@
import { docsService } from "@/services/DocsService";
export async function onBeforePrerenderStart() {
const allDocumentations = await docsService.getUrls("docs");
return allDocumentations;
}

11
compose-prod.yml Normal file
View File

@ -0,0 +1,11 @@
services:
memento-prod:
container_name: memento-prod
build:
context: .
dockerfile: production.Dockerfile
env_file:
- .env
ports:
- "${PORT}:${PORT}"
restart: unless-stopped

View File

@ -12,4 +12,4 @@ RUN chmod -R 775 /app
EXPOSE 3000 EXPOSE 3000
ENTRYPOINT [ "pnpm" ] ENTRYPOINT [ "pnpm" ]
CMD [ "sh", "-c", "if [ \"$NODE_ENV\" = 'production' ]; then pnpm preview; else pnpm dev; fi" ] CMD [ "pnpm", "dev" ]

17
production.Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM node:22-alpine
WORKDIR /app
RUN npm install -g pnpm
COPY ./app/package.json ./app/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --production
COPY ./app /app
RUN pnpm build
EXPOSE 3000
CMD [ "pnpm", "preview" ]