Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackdbd/giacomodebidda-indiekit
Indiekit server for my personal website
https://github.com/jackdbd/giacomodebidda-indiekit
indiekit indieweb
Last synced: 5 days ago
JSON representation
Indiekit server for my personal website
- Host: GitHub
- URL: https://github.com/jackdbd/giacomodebidda-indiekit
- Owner: jackdbd
- Created: 2024-10-17T09:41:03.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T16:02:58.000Z (3 months ago)
- Last Synced: 2024-11-17T02:24:27.451Z (2 months ago)
- Topics: indiekit, indieweb
- Language: Nix
- Homepage: https://giacomodebidda-indiekit.fly.dev/
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Indiekit server
[Indiekit](https://github.com/getindiekit/indiekit/) server I use to publish content to the [giacomodebidda-content](https://github.com/jackdbd/giacomodebidda-content/) repository.
## Development
To run this project locally you will need a MongoDB database and the Indiekit app itself. The file [`devenv.nix`](./devenv.nix) declares all the necessary components for a complete developer environment. This file is used by [devenv](https://github.com/cachix/devenv) to create and manage such environment.
`devenv.nix` defines a `mongodb` service (under the hood this background process is managed by [Process Compose](https://github.com/F1bonacc1/process-compose)). You can start it by running this command in a terminal:
```sh
devenv up
```To run the Indiekit Node.js app itself you have these alternatives:
- run the `serve` script defined in `devenv.nix` to launch Indiekit as a **Node.js application**.
- run the `container-run` script defined in `devenv.nix` to launch Indiekit as a **containerized application** (you will need to build the container image first by running `container-build`).
- Click **Run and Debug** in VS Code to use the [launch configuration](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) provided in `.vscode/launch.json`.> [!TIP]
> When debugging is useful to set the `DEBUG` environment variable.## Production
My Indiekit server is deployed on [Fly.io](https://fly.io/). My MongoDB database is hosted on [MongoDB Atlas](https://www.mongodb.com/products/platform/atlas-database).
Every time I need to deploy a new version of my Indiekit server I run this command:
```sh
fly-deploy
```> [!NOTE]
> The `Dockerfile` is used to build the container image locally and it's also used by Fly.io. However, [Fly.io uses a Dockerfile not to build a container image, but to create a Firecracker microVM](https://fly.io/blog/docker-without-docker/).Whenever I change a secret (e.g. `MONGO_URL`), I redeploy my secrets to Fly.io using this command.
```sh
fly-secrets-set
```> [!WARNING]
> As far as I understand, existing deployments in Fly.io are not updated to use the new secrets, so as soon as I edit my secrets I immediately redeploy my Indiekit server with `fly-deploy`.## Troubleshooting
To explore all layers of the container image, you can run this command that launches [dive](https://github.com/wagoodman/dive):
```sh
container-dive
```To scan the container image for vulnerabilities, you can run this command that uses [trivy](https://github.com/aquasecurity/trivy):
```sh
container-dive
```To inspect the developer environment generated by devenv, you can run `devenv info`.
> [!CAUTION]
> The command `devenv info` will print all the secrets that you defined in your `devenv.nix`.## Other people's Indiekit configurations
- [ciccarello-indiekit](https://github.com/aciccarello/ciccarello-indiekit/)
- [paulrobertlloyd-indiekit](https://github.com/paulrobertlloyd/paulrobertlloyd-indiekit)