Skip to content

Commit

Permalink
fix: remove container limitations (#248)
Browse files Browse the repository at this point in the history
* fix: remove container limitations

* chore: change some other docs
  • Loading branch information
CompuIves authored Apr 17, 2024
1 parent 316693c commit 81ab015
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions packages/projects-docs/pages/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ recommend using a [Devbox](/learn/devboxes/overview).

Yes, we have instructions [here](https://codesandbox.io/docs/learn/environment/vm#configuring-nodejs-version) that tell you how to change the Node version. All recent server sandboxes run in a Devbox.

For container sandboxes that are created after May 10 2021, we run Node v14.18.1 (LTS) by default.
For backwards compatibility, the older sandboxes are on Node v10. However, you can
specify a `node` value to alter the version in `sandbox.config.json` which will
be used instead. For further details, see [configuration](/learn/legacy-sandboxes/configuration).

<Callout>
This method only applies to legacy sandboxes.
</Callout>

Note that we recommend using Devboxes when you're working with Node.js projects.

## How do I change the editor's theme?

To change the [theme of a Devbox](https://codesandbox.io/docs/learn/editors/web/themes), click on the CodeSandbox logo at the top left, then go to Settings > User Preferences, and select a theme from the Themes dropdown. You can also do it from the [command palette](https://codesandbox.io/docs/learn/repositories/commandpalette).
Expand All @@ -106,18 +95,6 @@ We currently provide [Sandboxes](/learn/sandboxes/editor-features) and [Devboxes
`node_modules` and dependencies do not count toward this limit.
- The maximum file size that can be opened in the editor is 2MB. Files uploaded
that are larger than that still exist but are linked as a static asset.
- Terminal commands that alter the filesystem of the container instance aren't
synced with files shown in the editor. You'll need to refresh to see files
updated this way.
- When using a container, there is a sync limit of 10 files per second and only
files up to 2MB are synced with the editor. Files larger than that still exist
but are not shown in the editor's file tree. You're still able to write and
read to and from them in your code and they can be seen and edited via the
terminal.
- When using a container, the sandbox sleeps after around 10 minutes and can be woken by opening
the sandbox or preview in a web browser.
- When using a container, the sandbox has a 1GB persistent storage limit, a 1GB vCPU soft
limit, and a hard memory limit of 2 GB.

Devboxes are part of our evolved CodeSandbox experience, so we highly advise you to use them to avoid encountering these limitations.

Expand All @@ -138,19 +115,19 @@ No, you don't need to install Docker on your local machine. CodeSandbox has [bui

### How do I access the database once it's running in a Docker container?

You can access the database using the appropriate driver for your language or framework. Typically, you'll need to provide the hostname, port number, username, and password to connect to the database.
You can access the database using the appropriate driver for your language or framework. Typically, you'll need to provide the hostname, port number, username, and password to connect to the database. If you want to connect locally to the database, you can use our VSCode integration to open the Devbox inside VSCode, and then forward the port of the database to localhost.

### Can I use multiple databases in the same CodeSandbox project?

Yes, you can use multiple databases in the same project by running multiple Docker containers with different port numbers. However, keep in mind that running multiple databases can put a strain on your system resources and affect performance.
Yes, you can use multiple databases in the same project by running multiple Docker containers with different port numbers.

### Can I use Docker Compose in CodeSandbox?

Yes, you can use Docker Compose in CodeSandbox to orchestrate multiple containers and define the relationships between them. However, you'll need to create a Docker Compose file and run the `docker-compose` command in the terminal to start the containers.
Yes, you can use Docker Compose in CodeSandbox to orchestrate multiple containers and define the relationships between them. However, you'll need to create a Docker Compose file and run the `docker-compose` command in the terminal to start the containers. We share more about this [here](https://codesandbox.io/docs/tutorial/getting-started-with-docker#4-create-docker-compose-file).

### Is it safe to use a database in CodeSandbox with Docker support?

Yes, it's safe to use a database in CodeSandbox with Docker support, as long as you follow best practices for security and keep your database credentials private. Docker provides a secure and isolated environment for running containers, so your database is protected from external threats.
Yes, it's safe to use a database in CodeSandbox with Docker support, as long as you follow best practices for security and keep your database credentials private. Docker provides a secure and isolated environment for running containers, so your database is protected from external threats. We also prevent any connections to your Devbox without sign in if your Devbox is private.

### How do I troubleshoot issues with my database in CodeSandbox with Docker support?

Expand Down

0 comments on commit 81ab015

Please sign in to comment.