Sh4yy / tiny-stack

A simple and tiny stack for building web applications using Astro, SQLite, and Litestream.

Home Page:https://logsnag.com/blog/the-tiny-stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiny Stack

thumbnail

A simple and tiny stack for building web applications using Astro, SQLite, and Litestream.

Tutorial

Here is a thorough tutorial on the Tiny Stack.

Quick Start

  1. Build the Docker image
docker build -t tiny-stack .
  1. Set environment variables

Copy/paste the contents of .env.example into a new .env file and fill in the values, then run:

source .env

OR export individual variables:

export REPLICA_URL=https://<account_id>.r2.cloudflarestorage.com
export LITESTREAM_ACCESS_KEY_ID=access_key_id
export LITESTREAM_SECRET_ACCESS_KEY=secret_access_key
  1. Run the Docker image
docker run \                                                
  -p 4321:4321 \
  -e REPLICA_URL \
  -e LITESTREAM_ACCESS_KEY_ID \
  -e LITESTREAM_SECRET_ACCESS_KEY \
  -v $(pwd)/data:/data \
  tiny-stack

The same command as a single line in case slashes are causing issues:

docker run -p 4321:4321 -e REPLICA_URL -e LITESTREAM_ACCESS_KEY_ID -e LITESTREAM_SECRET_ACCESS_KEY -v $(pwd)/data:/data tiny-stack
  1. Head to http://localhost:4321

About

A simple and tiny stack for building web applications using Astro, SQLite, and Litestream.

https://logsnag.com/blog/the-tiny-stack

License:MIT License


Languages

Language:Astro 46.3%Language:TypeScript 18.3%Language:Dockerfile 17.0%Language:JavaScript 10.7%Language:Shell 7.6%