Troubleshooting Deployments This article contains a collection of common pitfalls when deploying your app on Codesphere. December 14, 2023 2 Min Read Codesphere From everyone in the Codesphere Team:) Table of Contents Our goal is to make deploying your apps super simple. For many frameworks everything will work straightforward & out of the box, as outlined in our Speedrun: Deploying an app doc. Sometimes you might encounter issues while deploying apps for the first time - we have compiled typical errors and the respective solutions here. If you cannot find a solution to your problem here, feel free to reach out to our support, we'll try to help you as soon as possible! Issues Solution Forgot to Deploy 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. Incorrect Host or Port 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. Permission denied 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 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. Enabled TLS/SSL encryption We currently don't support workspaces having their own TLS/SSL encryption. Please serve your application over HTTP and let Codesphere handle TLS/SSL termination. Your deployments will still have valid certificates. We will continue to add common problems here, if you think something is missing, feel free to reach out to our support via email or on our discord.
6/26/2024 Getting Started Deploying Landscapes on Codesphere Learn how to deploy and run multiple services that can independently scale vertically and horizontally within a single workspace. Suitable for hosting entire application landscapes.
5/28/2024 Integrations Connect to secured networks via VPN Codesphere provides a convenient way to work with private networks from our workspaces. Learn how it works in this doc article.
2/12/2024 Getting Started Monitoring & Alerting Learn how to access Codesphere's built in resource monitoring and check the uptime of your applications.
1/31/2024 Getting Started Path-Based Routing Learn how to connect multiple independent applications to a single domain by associating different paths with distinct workspaces