deploy quirrel to fly.io

This commit is contained in:
m5r 2021-10-24 16:54:35 +02:00
parent 7860cbb90d
commit cc4390d050
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,28 @@
app = "quirrel-prod"
[build]
image = "ghcr.io/quirrel-dev/quirrel:main"
[[services]]
internal_port = 9181
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.http_checks]]
interval = "10s"
method = "get"
path = "/health"
protocol = "http"
timeout = "2s"
[[services.ports]]
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443

View File

@ -0,0 +1,21 @@
# Quirrel
Quirrel instance running on fly.io
### Deploy
```shell
flyctl launch --name quirrel-prod
node -e "console.log(crypto.randomBytes(16).toString('hex'))" # copy its output
flyctl secrets set PASSPHRASES= # paste the 32-character long password copied previously
flyctl secrets set REDIS_URL=redis://:REDIS_PASSWORD@cdg.quirrel-redis-prod.internal:6379?family=6
flyctl deploy
```
### Set up with the app
Copy the output of this command below and set it to the app's `QUIRREL_TOKEN` secret
```shell
curl --user ignored:PASSPHRASES_FROM_EARLIER -X PUT https://quirrel-prod.fly.dev/tokens/shellphone
```