Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.18 KB

production.md

File metadata and controls

21 lines (11 loc) · 1.18 KB

Deploying to production

If you want to run a public Codapi instance, you'll need a server for that.

The server requirements mainly depend on the sandboxes you plan to install (e.g. just Python and SQLite or something heavier) and the amount of code runs you expect from your users (e.g. 1000 runs per day).

Personally, I prefer DigitalOcean for hosting. For lighter sandboxes, a $6 (1CPU/1GB RAM) or $12 (1CPU/2GB RAM) Basic droplet would do the trick. If you need something more powerful, a $42 CPU-optimized droplet (2CPU/4GB RAM) will definitely suffice.

I recommend using Debian as the operating system.

Follow these steps to set up a production server:

  1. Install Codapi on the server.

  2. Install Nginx and an HTTPS certificate (if you want Codapi to be accessible via HTTPS).

  3. Connect Nginx to Codapi.

You can also use Caddy or any other proxy you prefer instead of Nginx.

That's it!