Skip to Content
We are conducting a survey to learn how startups, SMEs, developers, and technical teams currently host, deploy, and operate software. Take the survey
Infralane
Infralane
TutorialsDeploy a web service

Tutorial: deploy a web service

In this tutorial, you deploy an HTTP application from GitHub. The example uses Node.js commands, but the same decisions apply to Python or Go applications.

Sample application contract

The example repository:

  • is available to the current workspace;
  • has a main branch;
  • builds with npm run build;
  • starts with npm start;
  • listens on port 3000;
  • reads optional configuration from environment variables.

Replace every example with the commands and port used by your application.

Prepare capacity

Create or choose an active resource pool with enough CPU and memory. For a first test, use the smallest application allocation that safely satisfies the application’s documented requirements.

Start a Git deployment

Open Applications → Deploy application. Enter a permanent name such as sample-api and a short description. Choose GitHub Repository.

Choose the repository

Select the repository from the connected account, or choose Public repository URL and enter its HTTPS URL. Set the branch to main. Use / for the root directory unless the app is inside a monorepo.

Configure the web service

Choose Web Service and Node.js. Enter:

FieldSample value
Build commandnpm run build
Start commandnpm start
Port3000

The application must listen on the same port. The command must keep the server process running.

Allocate resources

Select the resource pool, CPU, and memory. Confirm the application allocation fits within the pool with room for other workloads.

Add runtime values

Add only the variables the application needs. For example, a non-secret APP_ENV could have the value production. Add secret values only to their intended value fields and do not include them in screenshots.

Deploy and verify

Review the source, branch, root directory, commands, port, and resources. Select Deploy app. Wait for Live, open the public application, make a safe request, and inspect Logs for errors.

If the service builds but is unreachable, check the configured port and the interface on which your app listens. Do not work around the problem by exposing credentials or adding secret diagnostics to logs.

Make a configuration change

Open Settings → Source and build, change one field, and save that section. A new deployment starts. Use Deployments to verify it, then restore the original value through another reviewed deployment if the change was only a test.

Last updated on