Use Cases
Workers are the right resource type for any process that runs independently of incoming HTTP traffic:Queue Consumers
Pull jobs from SQS, Redis, or any other queue and process them in a tight loop.
Scheduled Jobs
Run periodic tasks such as report generation, cache warming, or data aggregation on a fixed schedule.
Data Pipelines
Ingest, transform, and load data between systems without tying up a web server.
Webhook Processors
Consume events from third-party services and take action asynchronously.
Requirements
Before you deploy a worker, make sure you have:- A GitHub repository with a
Dockerfileor a build setup that produces a runnable image. - An AWS account connected to Springwinter. See Connect Your AWS Account.
- A GitHub account connected via the Springwinter GitHub App. See Connect GitHub.
Deploy a Worker
1
Open your project
Navigate to your project in the Springwinter dashboard and click Add resource.
2
Select the Worker resource type
Choose Worker from the resource type list. You will be taken to the worker configuration form.
3
Select a repository and branch
Pick the GitHub repository and the branch to track. Springwinter builds a new image and redeploys the worker on every push to that branch when auto-deploy is enabled.
4
Set the start command
If your
Dockerfile does not define a default command, or you want to override it, enter the start command — for example, python worker.py or node dist/worker.js.5
Choose a compute size
Select the CPU units and memory allocation for the container. Larger workers can process more jobs in parallel or handle heavier in-memory workloads.
6
Deploy
Click Deploy. Springwinter builds the image and starts the container. The worker begins running immediately once the container reaches a running state.
Configuration Options
Source
Source
The GitHub repository and branch your worker is built from. Enable auto-deploy to automatically rebuild and restart the worker whenever you push a new commit to the tracked branch.
Compute size
Compute size
CPU units and memory (MiB) assigned to the container. You can update the compute size at any time — Springwinter stops the current container and starts a replacement with the new allocation.
Auto-deploy
Auto-deploy
When enabled, every push to the tracked branch triggers a new build and a rolling restart of the worker. Disable auto-deploy if you want to control exactly when the worker is updated.
Environment variables
Environment variables
Injected into the container at launch. Use environment variables to pass connection strings, API keys, and feature flags to your worker process. See Environment Variables.
API Reference
Create a Worker
Get a Worker
Update a Worker
Redeploy
To manually trigger a new build and restart without pushing a commit:Branch Previews
Each branch in your repository can have its own isolated preview worker deployment. Create a preview via the API:Environment Variables
Retrieve the current environment variables for a worker:PUT replaces the entire set of environment variables. Any keys not included in the request body are removed. See Environment Variables for full details.