Skip to content

Racinggavin/svltekit-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SvelteKit app with docker-compose test

I try to make SvelteKit Skeleton app which is created by npm init svelte@next app into docker image.

Just npm run build on localhost

Step 1. create skeleton app

> cd app-server
> npm init svelte@next app

create-svelte version 2.0.0-next.73

Welcome to SvelteKit!✔ Which Svelte app template? › Skeleton project
✔ Use TypeScript? … Yes
✔ Add ESLint for code linting? … Yes
✔ Add Prettier for code formatting? … Yes

Step 2. add node adapter kit

Refer to sveltekit website doc and adapter-node github doc, tweaks app-server/app/svelteconfig.json as below, then run npm i -D @sveltejs/adapter-node@next get the app-server/app/package.json updated

import node from '@sveltejs/adapter-node';

export default {
	kit: {
		adapter: node()
	}
};

To create and run docker image

Development

We can build and run the Welcome svelteKit app in docker container by using docker-compose -f docker-compose.dev.yml up successfully.

Production (something wrong)

To apply production we use just docker-compose up

About

SvelteKit app with docker-compose test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published