Working With a Monorepo: Shared Packages and npm Workspaces
Share code between the apps of a monorepo on Light Cloud with npm workspaces: what builds from a folder, why the container fails, the Dockerfile that fixes it.
Step-by-step guides to deploying apps, APIs and databases on Light Cloud.
Share code between the apps of a monorepo on Light Cloud with npm workspaces: what builds from a folder, why the container fails, the Dockerfile that fixes it.
Deploy a monorepo on Light Cloud: one app per repository folder, each with its own Root directory, and pushes that rebuild only the app whose folder changed.
Deploy a GitHub repository to Light Cloud: install the GitHub App, pick the repository, click Deploy. Every push deploys, and pull requests get a preview link.
Deploy a GitLab project to Light Cloud: connect GitLab, pick the project and branch, then every push deploys, and merge requests get a preview link and status.
Fix 'too many connections for role' on Light Cloud PostgreSQL: check the 10-connection limit, see who holds connections, and size pool max x instances.
Run database migrations on every Light Cloud deploy: a node-pg-migrate SQL file, npm start running it before the server, and why rollbacks leave the schema alone.
Rotate a Light Cloud PostgreSQL password safely: choose the new password, update DATABASE_URL first, rotate when the deploy finishes. 7 seconds of errors, not 2 minutes.
Import a SQL dump into a Light Cloud PostgreSQL database: upload a .sql or .sql.gz with Import dump, or stream a large dump with psql in one transaction.
Back up a Light Cloud PostgreSQL database: download a .sql.gz dump from the Backup tab, restore it into a new database with psql, and script it with pg_dump.