Dashboard

Build and deploy

Deploy from a zip file

Deploy a project from a .zip upload and replace the code later.

Upload a .zip of your project when the code isn't on GitHub. HCode builds it the same way as a repository, and you replace it by uploading a new zip.

Create a project from a zip

  1. Click New project, then Upload.
  2. Drag the .zip onto the drop zone, or use Choose file. Uploading starts at once.
  3. Click Continue. Uploads are not inspected, so check the build settings yourself: build mode, app type, start command and port.
  4. Name the project and click Create and deploy.

The file must end in .zip and be smaller than 500 MB. A larger file is refused with "The .zip file must be smaller than 500 MB." If the upload fails, Retry upload sends the same file again without choosing it a second time.

Create a project covers every field in the flow.

What to put in the zip

Zip the project folder as you would push it: the manifest (package.json, requirements.txt and so on), the lockfile, the source and, for a Dockerfile build, the Dockerfile. The build installs dependencies from the lockfile itself.

  • If everything sits in one top-level folder, as in GitHub's Download ZIP archives, HCode builds from inside that folder. __MACOSX and .DS_Store entries are ignored when it decides. This applies only while Root directory is /.
  • Symbolic links in the zip are skipped.
  • The unpacked files can be at most four times the upload limit. Past that the deploy fails with "extracted upload exceeds size limit".

Each zip belongs to one project. Using the same upload for a second project gives "This uploaded source bundle was already used for a project. Open the existing project or upload a new zip to create another one."

Upload a new version

  1. Open the project's Settings. Upload projects have a Source bundle section.
  2. Use Choose file to pick the new .zip.
  3. Click Redeploy with new zip.

HCode uploads the file and starts a deploy with it. Viewers don't see the upload controls.

Deploying again without a new file reuses the last zip you uploaded, for 48 hours after the upload. After that, upload the zip again; a deploy without one is refused with "this upload-based project has no reusable source bundle yet. re-upload a zip before deploying again". Restart and rollback don't need the zip.

Fixing build errors

A zip project has no repository to push to, so a fix always means changing your local copy and uploading it again. The build's error messages say so, for example "Run npm install locally so package-lock.json matches the current project, then zip and upload the project again." See Build failures.