This is a blog built with svelte
Install dependencies with your least hated package manager:
npm install
Setup your [.env] file as example
[!INFO]
AUTH_SECRET
may be generated withopenssl rand -hex 32
See more in the auth.js setup docs
Testing the project is simple as follows:
# this will start our database
docker compose up
# this will start our server
npm run dev
Note
You may need to specify the alternative env file to docker compose if you're using .env.local
or .env.prod
In this case any invocations of compose must be followed by --env-file
as example: docker compose --env-file .env.local ...
To run our server as production:
# Using .env
docker compose up -d
sudo pnpm dev --host --port 80
# Using .env.prod
docker compose --env-file .env.prod up -d
sudo pnpm dev --host --port 80 --mode prod
To create a production version of the project:
npm run build
You can preview the production build with sudo npm run preview --host --port 80 --mode prod
.
To deploy the app, you may need to install an adapter for your target environment.