File tree Expand file tree Collapse file tree 8 files changed +170
-17
lines changed Expand file tree Collapse file tree 8 files changed +170
-17
lines changed Original file line number Diff line number Diff line change 1+ Dockerfile
2+ compose.yml
3+ .dockerignore
4+
5+ .git
6+ .gitignore
7+ .gitattributes
8+
9+
10+ .npmrc
11+ .prettierrc
12+ .eslintrc.cjs
13+ .graphqlrc
14+ .editorconfig
15+ .svelte-kit
16+ .vscode
17+ node_modules
18+ build
19+ package
20+ ** /.env
21+
22+ README.md
Original file line number Diff line number Diff line change 1+ ARG NODE_VERSION=22
2+
3+
4+ FROM node:${NODE_VERSION}-slim AS base
5+
6+ ENV SVELTEKIT_ADAPTER=nodejs
7+ ENV PNPM_HOME="/pnpm"
8+ ENV PATH="$PNPM_HOME:$PATH"
9+
10+ RUN corepack enable
11+ COPY . /app
12+ WORKDIR /app
13+
14+ FROM base AS deps-prod
15+ RUN pnpm install --frozen-lockfile --prod
16+
17+ FROM base AS build
18+ RUN pnpm install --frozen-lockfile
19+ RUN pnpm run build
20+
21+ FROM base
22+ COPY --from=deps-prod /app/node_modules /app/node_modules
23+ COPY --from=build /app/build /app/build
24+ EXPOSE 3000
25+ CMD [ "node" , "build" ]
Original file line number Diff line number Diff line change 1+ services :
2+ explorer :
3+ build : .
4+ env_file : .env
5+ ports :
6+ - ' 3000:3000'
Original file line number Diff line number Diff line change 3939 "@iconify/tailwind4" : " ^1.0.6" ,
4040 "@openfoodfacts/openfoodfacts-nodejs" : " 2.0.0-alpha.19" ,
4141 "@sinnwerkstatt/sveltekit-matomo" : " github:VaiTon/sveltekit-matomo" ,
42+ "@sveltejs/adapter-node" : " ^5.3.3" ,
4243 "@sveltejs/adapter-vercel" : " ^5.10.3" ,
4344 "@sveltejs/kit" : " ^2.44.0" ,
4445 "@sveltejs/vite-plugin-svelte" : " ^6.2.1" ,
5960 "fuse.js" : " ^7.1.0" ,
6061 "globals" : " ^16.4.0" ,
6162 "html5-qrcode" : " ^2.3.8" ,
62- "husky" : " ^9.1.7" ,
6363 "iso-639-1" : " ^3.1.5" ,
6464 "jsbarcode" : " ^3.12.1" ,
6565 "leaflet" : " ^1.9.4" ,
105105 "dependencies" : {
106106 "@openfoodfacts/openfoodfacts-webcomponents" : " ^1.14.2" ,
107107 "@sentry/sveltekit" : " ^10.17.0" ,
108- "@webcomponents/webcomponentsjs" : " ^2.8.0"
108+ "@webcomponents/webcomponentsjs" : " ^2.8.0" ,
109+ "husky" : " ^9.1.7"
109110 }
110111}
Original file line number Diff line number Diff line change 1- import {
1+ import { env as publicEnv } from '$env/dynamic/public' ;
2+
3+ const {
4+ PUBLIC_ROBOTOFF_URL ,
5+ PUBLIC_IMAGES_URL ,
6+ PUBLIC_NUTRIPATROL_URL ,
27 PUBLIC_AUTH_BASE_URL ,
38 PUBLIC_AUTH_PKCE_ID ,
4- PUBLIC_IMAGES_URL ,
5- PUBLIC_KEYCLOAK_REALM ,
6- PUBLIC_ROBOTOFF_URL ,
7- PUBLIC_NUTRIPATROL_URL
8- } from '$env/static/public' ;
9+ PUBLIC_KEYCLOAK_REALM
10+ } = publicEnv ;
911
1012export {
1113 PUBLIC_ROBOTOFF_URL as ROBOTOFF_URL ,
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import * as publicEnv from ' $env/static /public' ;
2+ import * as publicEnv from ' $env/dynamic /public' ;
33
44 import { preferences } from ' $lib/settings' ;
55 import { createFolksonomyApi , updateFolksonomyAuthToken } from ' $lib/api/folksonomy' ;
Original file line number Diff line number Diff line change 1- import adapter from '@sveltejs/adapter-vercel' ;
1+ import vercelAdapter from '@sveltejs/adapter-vercel' ;
2+ import nodejsAdapter from '@sveltejs/adapter-node' ;
23import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' ;
34
5+ function runningOnVercel ( ) {
6+ return 'VERCEL' in process . env ;
7+ }
8+
9+ const adapter = runningOnVercel ( ) ? vercelAdapter ( ) : nodejsAdapter ( ) ;
10+
411/** @type {import('@sveltejs/kit').Config } */
512const config = {
613 // Consult https://kit.svelte.dev/docs/integrations#preprocessors
714 // for more information about preprocessors
815 preprocess : vitePreprocess ( ) ,
916
1017 kit : {
11- // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
12- // If your environment is not supported or you settled on a specific environment, switch out the adapter.
13- // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14- adapter : adapter ( ) ,
18+ adapter : adapter ,
1519
1620 csp : {
1721 directives : {
You can’t perform that action at this time.
0 commit comments