Skip to content

Vite Template for running a SvelteKit App in a Docker Environment

License

Notifications You must be signed in to change notification settings

tony-stark-eth/vite-sveltekit-docker-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite SvelteKit Docker Template

This template offers the following things, ready to use, in a dockerized environment:

Create with it!

Create with Svelte 5 (experimental):

npx degit tony-stark-eth/vite-sveltekit-docker-template app-name

Requirements

  • Docker
  • make

Installation

make setup
make up
make install

Development

docker compose exec app pnpm run dev

Build

docker compose exec app pnpm run build

Preview

docker compose exec app pnpm run preview

Test

docker compose exec app pnpm run test

Or with coverage in build directory

docker compose exec app pnpm run test:coverage

E2E Testing

docker compose exec app pnpm run test:e2e

OS specific settings

Windows + WSL2 + Symlinks + PNPM

In case your running a setup like me, WSL2 with Ubuntu and have your IDE running on Windows, your IDE may not be able to use symlinks created by pnpm. For this scenario you can do the following

cp .npmrc.dist .npmrc
make build
make up
make install

This will run pnpm without symlinks.

Git Hooks

This template also supports git hooks to ensure code quality and consistency before commits and pushes.

These can be activated with:

make git-enable-hooks

Or deactivated with:

make git-disable-hooks