on fly.io
 
 
Go to file
syui 364c3ab957
add update
2023-02-28 04:55:04 +09:00
.dockerignore first 2023-01-09 14:50:02 +09:00
.env.local update readme 2023-01-25 10:42:12 +09:00
.gitignore update readme 2023-01-25 10:42:12 +09:00
Dockerfile fix 2023-01-11 13:44:52 +09:00
config.yaml fix 2023-01-11 13:44:52 +09:00
fly.toml fix 2023-01-11 13:44:52 +09:00
readme.md update readme 2023-01-25 10:42:12 +09:00
update.zsh add update 2023-02-28 04:55:04 +09:00

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