To deploy an app in Codesphere, run your app from the Codesphere IDE's terminal just as you would from your local IDE or create and run a CI pipeline. For example, when using Node.js, the command to start your server would typically be something like
npm start or
npm run start:production.
Codesphere apps must be deployed to host 0.0.0.0 and port 3000. Many web frameworks will not deploy here by default. For some frameworks we already have docs with more details.
Installed packages are not persistent across restarts
Each workspace plan comes with some allocated storage. It is important that it is linked to a specific directory,
/home/user/app - everything installed in this or below this directory is persistent. Other directories have limited sizes and get wiped each restart. Not all frameworks install in the current working directory automatically. If yours doesn't, please refer to the official framework documentation and configure the path accordingly.
Codesphere does not allow full root access due to security reasons. You can install OS level packages via Nix which will give you a similar experience and flexibility. You can learn more about how to use Nix here.
Standby when unused / free workspace unable to start on domain visit
Your workspace will turn off after 60 minutes of inactivity. It will try to reboot automatically on visiting the domain or opening the IDE. That only works if there is a valid & running CI pipeline defined. If your workspace is stuck in the reboot loop, first check the CI pipeline for run errors.
App requires more than one port, i.e. server and frontend
While opening multiple ports is nice when testing stuff on localhost, it is not a valid approach for internet facing domains - these are always required to be served on a single port. When working with such setup, it makes sense to configure the different parts to be served by different workspaces and domains (i.e. backend.yourdomain.com).
GitHub Repositories no longer visible in the create workspace modal
For security reasons GitHub periodically invalidates access tokens. When this happens you might have to re-grant access to your repositories.