Skip to content

Commit

Permalink
feat!: migrate from Heroku to Railways
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Starting November 28th, 2022, Heroku free tier will no longer be available. Thus, in order to avoid service disruption for Mach, its API was migrated to Railways.app.
  • Loading branch information
jpedroh committed Sep 11, 2022
1 parent 33a6f2a commit c28d32f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: api_production
url: https://mach-api.herokuapp.com
url: https://mach-api-production.up.railway.app/
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -17,21 +17,14 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: heroku container:login
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
- uses: docker/build-push-action@v2
with:
tags: |
registry.heroku.com/mach-api/web:latest
ghcr.io/jpedroh/mach-rest-api:latest
ghcr.io/jpedroh/mach-rest-api:${{ github.event.release.tag_name }}
file: ./packages/rest-api/Dockerfile
build-args: APP_VERSION_ARG=${{ github.event.release.tag_name }}
push: true
- run: heroku container:release web -a mach-api
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
build_rpl_crawler:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion packages/front/src/hooks/use-flights-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type FlightsResponse = {
}

function fetchFlights(query: FlightsQuery & { offset: number }) {
return http<FlightsResponse>({ url: '//mach-api.herokuapp.com/flights', query: { ...query, limit: 30 } })
return http<FlightsResponse>({ url: '//mach-api-production.up.railway.app/flights', query: { ...query, limit: 30 } })
}

export function useFlightsQuery(params: FlightsQuery) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"servers": [
{
"url": "https://mach-api.herokuapp.com"
"url": "https://mach-api-production.up.railway.app"
}
],
"tags": [
Expand Down

0 comments on commit c28d32f

Please sign in to comment.