A Sveltkit front-end for viewing and manipulating my webservices data.
src | ||
static | ||
.dockerignore | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
docker-compose.yml | ||
Dockerfile | ||
eslint.config.js | ||
LICENSE | ||
Notes.md | ||
package-lock.json | ||
package.json | ||
README.md | ||
svelte.config.js | ||
vite.config.js |
Webservices App
This is an app I'm creating to visualise data I've created (in JSON form) describing my self-hosted (professional, volunteer, & personal) webservices.
Installing the Webservices App
You can clone this repository from my Forgejo instance using this command (replacing the latter webservices-app with your preferred directory name!):
git clone https://forge.magnificent.nz/lightweight/webservices-app.git webservices-app
then
cd webservices-app
npm install
or, if you're using pnpm, use pnpminstall
or for yarn, yarn
. That will install the svelte and other javascript dependencies.
Developing
Once you've created a project and installed dependencies, start a development server:
npm run dev
or start the server and open the app in a new browser tab
npm run dev -- --open
Building
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
Deployment
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
You can push your new container to a docker container repository (I use my Forgejo instance!)
docker push forge.magnificent.nz/lightweight/webservices-app:latest
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'