feat(#4): Add docker support

This commit is contained in:
Josh Creek
2026-02-22 16:51:22 +00:00
parent 584c3f5803
commit e2052082e0
11 changed files with 217 additions and 499 deletions
+11 -5
View File
@@ -1,6 +1,15 @@
import adapter from '@sveltejs/adapter-netlify';
import netlifyAdapter from '@sveltejs/adapter-netlify';
import staticAdapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const deployTarget = (process.env.DEPLOY_TARGET ?? 'docker').toLowerCase();
const adapter = deployTarget === 'netlify'
? netlifyAdapter()
: staticAdapter({
fallback: 'index.html',
strict: false
});
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
@@ -8,10 +17,7 @@ const config = {
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
adapter
}
};