mirror of
https://github.com/jcreek/OpenNetworkDiagram.git
synced 2026-07-12 18:43:44 +00:00
feat(#4): Add docker support
This commit is contained in:
+11
-5
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user