Deployment - Take434/Appollon GitHub Wiki

This page will give only a very short overview of the deployment process of Appollon.
There might be an update in the future to describe the deployment in further detail, but due to length limitations in the context of the university project this page will be limited to notes for now.

First Deployment Idea

The Idea was to have the deployment of Appollon done in Microsoft Azure.
But due to the following problems this idea was abandoned

  • The Static Web App did not fit the project / did not work
  • Deployment using Docker
    • Problems getting the docker image because of pnpm [2]
    • Deploying to GHCR [1] worked well enough
    • Connecting to Azure required additional steps [3]
      • Had to create an application in the application registry
      • Connect this application to the azure subscription
      • Give the application Collaborator access
      • Use the Application Credentials in the GitHub action
    • Deploying to Azure does not work
      • For some reason the image seems to be corrupted or not functional
        • The container remains stuck in a waiting state
        • This means that the image is broken
      • There might be problems when pulling from GHCR
        • After further testing GHCR does not seem to be the problem
      • Error while container starts (ENOTFOUND)
        • This seems to be caused by experimental fetch? relevant github discussion
        • Further research shows that the problem seems to be connected to DNS Settings
        • Probably occurs because container cant access internet
      • Due to the error above Azure could not be used, no solution has been found as of yet
      • Asked on the official Azure discord, but no answers yet

Vercel deployment

Because the Azure deployment did not work, it was decided to utilize Vercel. This company also developed Next.js, so they offer very good integration and make the deployment process as simple as possible. Furthermore it was very simple to chose a custom domain.

Restrictions of Vercel

  • Limited reply time for server actions
    • Depending on the plan chosen, server actions only run for a limited amount of time
    • The free tier only allows for 10 seconds
    • This means that the server has to respond in 10 seconds or times out
    • This is not possible if the user queries more than a few hundred songs from Spotify
    • After some testing the limit seems to be about 400 Songs in a playlist
    • Possible solutions
      • There is little to be done about the speed of the Spotify API
      • Implement multithreading
      • Optimize server actions
      • Neither was implemented because of time constraints
      • Most likely the app will be deployed on azure if the issue described above is fixed

References

[1] GitHub Docs Working with the Container registry accessed 29.07.2023
[2] pnpm Docs pnpm CLI accessed 29.07.2023
[3] Microsoft Docs 2023 Configure a GitHub Action to create a container instance accessed 29.07.2023
[4] Next.js Docs Deploying Your Next.js App accessed 29.07.2023
[5] Vercel Docs 2023 Limits accessed 29.07.2023

⚠️ **GitHub.com Fallback** ⚠️