|
||
---|---|---|
.dockerignore | ||
.env.local | ||
.gitignore | ||
Dockerfile | ||
config.yaml | ||
fly.toml | ||
readme.md | ||
update.zsh |
readme.md
$ git clone https://codeberg.org/silverpill/mitra
$ git clone https://codeberg.org/silverpill/mitra-web
$ cd mitra-web
$ npm install --no-save
$ npx allow-scripts
$ npm run build
$ mv dist ../mitra/
$ cp config.yaml ./mitra
$ cp .env.local ./mitra
$ flyctl deploy --remote-only
json
$ curl -sL http://127.0.0.1:8380/api/v1/instance
cloudflare
$ fly certs create $app.fly.dev
$ fly certs create $sub.example.com
$ fly certs show $sub.example.com
cname : _acme-challenge.$app
, $app.fly.dev.xxx.flydns.net
, Proxied
cname : $sub
, $app.fly.dev
, Proxied
update
$ cd mitra
$ git pull
$ vim config.yaml
#database_url: postgres://mitra:mitra@example.com:55432/mitra
database_url: postgres://mitra:mitra@127.0.0.1:55432/mitra
$ cd ../mitra-web
$ git pull
$ nvm use v14
$ npm install --no-save
$ npx allow-scripts
$ echo "VUE_APP_BACKEND_URL=" > .env.local
$ npm run build
$ cd ..
$ mv mitra/dist ./dist-backup
$ mv mitra-web/dist ./mitra
# test
$ cd ./mitra
$ sudo docker-compose up -d
$ cargo build
$ ./target/debug/mitra
---
$ curl -sLO localhost:8380
$ cd ../
$ vim ./mitra/config.yaml
database_url: postgres://mitra:mitra@example.com:55432/mitra
#database_url: postgres://mitra:mitra@127.0.0.1:55432/mitra
$ fly deploy