The deployment toolkit to fly.io with shoreman, litestream, h2o and gotosocial for my fediverse instance.
You could build the docker container as these commands:
# generates the software configurations.
# thses commands requires `nix` with experimental features.
$ nix eval --json --file src/h2o.nix >runtime/h2o.json
$ nix eval --json --file src/gotosocial.nix >runtime/gotosocial.json
$ nix eval --json --file src/litestream.nix >runtime/litestream.json
# build to the docker container
$ docker build -t kalaclista-social-v2_1 .
You could customize these softwares owners, repositories, revisions or versions by the build args:
Naming rules as:
GITHUB_*_OWNER
- The repository owner on GitHubGITHUB_*_REPOSITORY
- The repository name on GitHubGITHUB_*_REVISION
- The hash value of revision on the git repositoryGITHUB_*_VERSION
- This value exists for metadata, but is not always
As current exists:
GITHUB_SHOREMAN_URL="https://raw.githubusercontent.com/chrismytton/shoreman/master/shoreman.sh"
GITHUB_SHOREMAN_SHA256="a21acce3072bb8594565094e4a9bbafd3b9d7fa04abd7e0c74c19fd479adb817"
GITHUB_LITESTREAM_OWNER=benbjohnson
GITHUB_LITESTREAM_REPOSITORY=litestream
GITHUB_LITESTREAM_REVISION=977d4a5ee45ae546537324a3cfbf926de3bebc97
GITHUB_LITESTREAM_VERSION=v0.3.13
GITHUB_H2O_OWNER=h2o
GITHUB_H2O_REPOSITORY=h2o
GITHUB_H2O_REVISION=653fccf538aa2f2424946f56d39e5de96921c4bb
GITHUB_GOTOSOCIAL_OWNER=superseriousbusiness
GITHUB_GOTOSOCIAL_REPOSITORY=gotosocial
GITHUB_GOTOSOCIAL_REVISION=fb3e3ca10dc44cba841019bee1a8812e746133e9
GITHUB_GOTOSOCIAL_VERSION=v0.13.3
If you would to find more details, please looking at Dockerfile or Makefile.
For working this container, you need to define the these environment variables by any methods:
GTS_STORAGE_S3_ENDPOINT=
GTS_STORAGE_S3_ACCESS_KEY=
GTS_STORAGE_S3_SECRET_KEY=
GTS_STORAGE_S3_BUCKET=
GTS_SMTP_HOST=
GTS_SMTP_PORT=
GTS_SMTP_USERNAME=
GTS_SMTP_PASSWORD=
GTS_SMTP_FROM=
LITESTREAM_ACCESS_KEY_ID=
LITESTREAM_SECRET_ACCESS_KEY=
LITESTREAM_S3_ENDPOINT=
These environment variables requires by gotosocial or litestream, and you would to find more details, you could by their documentations.
The files of src/*.nix
or fly.tonl
is for my instance.
If you would to use these files your instance, please rewrite to yours.
This repository excepts some files, is under the AGPL.
Excepts files are as:
- web/www/logo.png
- this file is the my avatar icon, and all rights reserved.
- web/www/ads.txt
- this file is metadata file for google adsense on my website. you chould not use.
OKAMURA Naoki aka nyarla @nyarla@kalaclista.com