1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Add zero-config self hosting on Render (#612)

* v1 of backend implementation for self hosting

* Add docs

* Add upgrades controller

* Add global helpers for self hosting mode

* Add self host settings controller

* Conditionally show self hosting settings

* Environment and config updates

* Complete upgrade prompting flow

* Update config for forked repo

* Move configuration of github provider within class

* Add upgrades cron

* Update deploy button

* Update guides

* Fix render deployer

* Typo

* Enable auto upgrades

* Fix cron

* Make upgrade modes more clear and consistent

* Trigger new available version

* Fix logic for displaying upgrade prompts

* Finish implementation

* Fix regression

* Trigger new version

* Add i18n translations

* trigger new version

* reduce caching time for testing

* Decrease cache for testing

* trigger upgrade

* trigger upgrade

* Only trigger deploy once

* trigger upgrade

* If target is commit, always upgrade if any upgrade is available

* trigger upgrade

* trigger upgrade

* Test release

* Change back to maybe repo for defaults

* Fix lint errors

* Clearer naming

* Fix relative link

* Add abs path

* Relative link

* Update docs
This commit is contained in:
Zach Gollwitzer 2024-04-13 09:28:45 -04:00 committed by GitHub
parent 2bbf120e2f
commit 5aca2ff9b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 1356 additions and 111 deletions

View file

@ -0,0 +1,235 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/rails/rails/releases
body:
encoding: US-ASCII
string: ""
headers:
Accept:
- application/vnd.github.v3+json
User-Agent:
- Octokit Ruby Gem 8.1.0
Content-Type:
- application/json
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
message: OK
headers:
Server:
- GitHub.com
Date:
- Wed, 10 Apr 2024 19:52:56 GMT
Content-Type:
- application/json; charset=utf-8
Cache-Control:
- public, max-age=60, s-maxage=60
Vary:
- Accept, Accept-Encoding, Accept, X-Requested-With
Etag:
- W/"a032e5cc14d6dc10a55126bd742c08afc1365c4cf381d6d5ce3b4014cfbf2de5"
X-Github-Media-Type:
- github.v3; format=json
Link:
- <https://api.github.com/repositories/8514/releases?page=2>; rel="next", <https://api.github.com/repositories/8514/releases?page=4>;
rel="last"
X-Github-Api-Version-Selected:
- "2022-11-28"
Access-Control-Expose-Headers:
- ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes,
X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO,
X-GitHub-Request-Id, Deprecation, Sunset
Access-Control-Allow-Origin:
- "*"
Strict-Transport-Security:
- max-age=31536000; includeSubdomains; preload
X-Frame-Options:
- deny
X-Content-Type-Options:
- nosniff
X-Xss-Protection:
- "0"
Referrer-Policy:
- origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy:
- default-src 'none'
X-Ratelimit-Limit:
- "60"
X-Ratelimit-Remaining:
- "53"
X-Ratelimit-Reset:
- "1712781639"
X-Ratelimit-Resource:
- core
X-Ratelimit-Used:
- "7"
Accept-Ranges:
- bytes
Transfer-Encoding:
- chunked
X-Github-Request-Id:
- C8A7:A3F5F:11C7A6D:1BA83CE:6616EE18
body:
encoding: ASCII-8BIT
string: '[{"tag_name": "v7.1.3.2", "html_url": "http://localhost"}]' # manually abbreviated for clarity
recorded_at: Wed, 10 Apr 2024 19:52:56 GMT
- request:
method: get
uri: https://api.github.com/repos/rails/rails/branches/main
body:
encoding: US-ASCII
string: ""
headers:
Accept:
- application/vnd.github.v3+json
User-Agent:
- Octokit Ruby Gem 8.1.0
Content-Type:
- application/json
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
message: OK
headers:
Server:
- GitHub.com
Date:
- Wed, 10 Apr 2024 19:52:57 GMT
Content-Type:
- application/json; charset=utf-8
Cache-Control:
- public, max-age=60, s-maxage=60
Vary:
- Accept, Accept-Encoding, Accept, X-Requested-With
Etag:
- W/"bbcf30919f0ef5fae2b2a28f58d50e3fb2cea8aa75418d5f2b919a7f857b27d0"
X-Github-Media-Type:
- github.v3; format=json
X-Github-Api-Version-Selected:
- "2022-11-28"
Access-Control-Expose-Headers:
- ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes,
X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO,
X-GitHub-Request-Id, Deprecation, Sunset
Access-Control-Allow-Origin:
- "*"
Strict-Transport-Security:
- max-age=31536000; includeSubdomains; preload
X-Frame-Options:
- deny
X-Content-Type-Options:
- nosniff
X-Xss-Protection:
- "0"
Referrer-Policy:
- origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy:
- default-src 'none'
X-Ratelimit-Limit:
- "60"
X-Ratelimit-Remaining:
- "52"
X-Ratelimit-Reset:
- "1712781639"
X-Ratelimit-Resource:
- core
X-Ratelimit-Used:
- "8"
Accept-Ranges:
- bytes
Content-Length:
- "3964"
X-Github-Request-Id:
- C8A8:281896:11B1812:1B69B2F:6616EE19
body:
encoding: ASCII-8BIT
# manually abbreviated for clarity
string: '{"commit":{"sha":"84997578c59aa88fe114cef176115f1612b6de6b", "html_url":"https://github.com/rails/rails/commit/84997578c59aa88fe114cef176115f1612b6de6b"}}'
recorded_at: Wed, 10 Apr 2024 19:52:57 GMT
- request:
method: get
uri: https://api.github.com/repos/rails/rails/commits/v7.1.3.2
body:
encoding: US-ASCII
string: ""
headers:
Accept:
- application/vnd.github.v3+json
User-Agent:
- Octokit Ruby Gem 8.1.0
Content-Type:
- application/json
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
message: OK
headers:
Server:
- GitHub.com
Date:
- Wed, 10 Apr 2024 19:52:57 GMT
Content-Type:
- application/json; charset=utf-8
Cache-Control:
- public, max-age=60, s-maxage=60
Vary:
- Accept, Accept-Encoding, Accept, X-Requested-With
Etag:
- W/"0668fc459669113a200777ee9ddd56a6ca2efb647894b006d3966504c7c82f13"
Last-Modified:
- Wed, 21 Feb 2024 21:43:55 GMT
X-Github-Media-Type:
- github.v3; format=json
X-Github-Api-Version-Selected:
- "2022-11-28"
Access-Control-Expose-Headers:
- ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes,
X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO,
X-GitHub-Request-Id, Deprecation, Sunset
Access-Control-Allow-Origin:
- "*"
Strict-Transport-Security:
- max-age=31536000; includeSubdomains; preload
X-Frame-Options:
- deny
X-Content-Type-Options:
- nosniff
X-Xss-Protection:
- "0"
Referrer-Policy:
- origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy:
- default-src 'none'
X-Ratelimit-Limit:
- "60"
X-Ratelimit-Remaining:
- "51"
X-Ratelimit-Reset:
- "1712781639"
X-Ratelimit-Resource:
- core
X-Ratelimit-Used:
- "9"
Accept-Ranges:
- bytes
Transfer-Encoding:
- chunked
X-Github-Request-Id:
- C8A9:23AA82:11FFCB8:1C057CD:6616EE19
body:
encoding: ASCII-8BIT
# manually abbreviated for clarity
string: '{"sha":"6f0d1ad14b92b9f5906e44740fce8b4f1c7075dc"}'
recorded_at: Wed, 10 Apr 2024 19:52:57 GMT
recorded_with: VCR 6.2.0