From 641dbeeea40d26e19c0bcb5386e8b1e629b23a85 Mon Sep 17 00:00:00 2001 From: Akis Date: Sat, 31 Dec 2022 20:25:09 +0200 Subject: [PATCH] fix everything in an elegant way --- Dockerfile | 6 +----- compose.yml | 1 - package.json | 1 - pnpm-lock.yaml | 7 ------- svelte.config.js | 5 ++++- vite.config.ts | 5 +---- 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0441d56..be67e12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,4 @@ RUN pnpm build EXPOSE 4173 -ENV PORT=4173 - -ENV ORIGIN=http://localhost:4173 - -CMD ["node", "build"] \ No newline at end of file +CMD ["pnpm", "preview", "--host"] \ No newline at end of file diff --git a/compose.yml b/compose.yml index 491151b..bbac965 100644 --- a/compose.yml +++ b/compose.yml @@ -11,7 +11,6 @@ services: environment: AUTH_SECRET: ${AUTH_SECRET} AUTH_TRUST_HOST: ${AUTH_TRUST_HOST} - ORIGIN: ${ORIGIN} AUTH_URL: ${AUTH_URL} DB_HOST: ${DB_HOST} DB_PORT: ${DB_PORT} diff --git a/package.json b/package.json index 4f13407..452a85a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "dependencies": { "@auth/core": "^0.2.4", "@auth/sveltekit": "^0.1.11", - "dotenv": "^16.0.3", "joi": "^17.7.0", "pg": "^8.8.0", "pg-hstore": "^2.3.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0326827..e8bba58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,6 @@ specifiers: consola: ^2.15.3 dayjs: ^1.11.7 discord-webhook-node: ^1.1.8 - dotenv: ^16.0.3 joi: ^17.7.0 mdsvex: ^0.10.6 pg: ^8.8.0 @@ -34,7 +33,6 @@ specifiers: dependencies: '@auth/core': 0.2.4 '@auth/sveltekit': 0.1.11_f5fzfhbe3oooig6fzl5vkyl5v4 - dotenv: 16.0.3 joi: 17.7.0 pg: 8.8.0 pg-hstore: 2.3.4 @@ -946,11 +944,6 @@ packages: - encoding dev: true - /dotenv/16.0.3: - resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} - engines: {node: '>=12'} - dev: false - /dottie/2.0.2: resolution: {integrity: sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg==} dev: false diff --git a/svelte.config.js b/svelte.config.js index 8c4fcc7..1ffe2db 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -17,7 +17,10 @@ const config = { ], kit: { - adapter: adapter() + adapter: adapter(), + csrf: { + checkOrigin: false + } } }; diff --git a/vite.config.ts b/vite.config.ts index 0049119..c606446 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,10 +3,7 @@ import unoCSS from "unocss/vite"; import { defineConfig } from "vite"; const config = defineConfig({ - plugins: [sveltekit(), unoCSS()], - optimizeDeps: { - include: ["pg", "pg-hstore"] - } + plugins: [sveltekit(), unoCSS()] }); export default config;