A recipe for deploying a SvelteKit app via Docker Compose.
Go to file Use this template
2024-08-30 14:29:07 +12:00
.gitignore second commit with content but still need .env info 2024-08-28 15:53:01 +12:00
docker-compose.yml second commit with content but still need .env info 2024-08-28 15:53:01 +12:00
Dockerfile second commit with content but still need .env info 2024-08-28 15:53:01 +12:00
env.sample tweaked README and sample .env file 2024-08-30 14:29:07 +12:00
LICENSE Initial commit 2024-08-28 15:26:50 +12:00
README.md tweaked README and sample .env file 2024-08-30 14:29:07 +12:00

sveltekit-docker-deployment

A recipe for deploying a SvelteKit app via Docker Compose.

This project owes a lot to this reference.

To set up your SvelteKit project, ensure that your svelte.config.js file has this line:

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

and then run

npm i -D @sveltejs/adapter-node
npm i dotenv

To build a new image

docker-compose build

To start it up (and tail the logs - CTRL-C to quit out of the logs without affecting running container)

docker-compose up -d && docker-compose logs -f

To clear out an old image (if it's running)

docker-compose down --remove-orphans --rmi 'all'