To run a local builder instance and hack it around youwill have to use Docker and Compose:
docker-compose up
# OR
docker-compose up -d # This will run the platform as a background daemon
Once started, you will be able to reach each service with the following URLs:
- Builder API:
http://localhost:8087
- Redis:
redis://localhost:8089
Redis does not come with any management console. You can use redis-commander if you want to browse the database.
The builder platform is shipped and deployed as a docker image. To build it, run:
docker build -t atoum/builder .
The telemtry platform is configured through environment variables:
Variable | Description | Default | API | Worker |
---|---|---|---|---|
ATOUM_BUILDER_AUTH_TOKEN |
Authentication token used for webhooks | null |
X | |
ATOUM_BUILDER_PHAR_DIRECTORY |
Directory used to store PHARs | null |
X | |
ATOUM_BUILDER_REDIS_HOST |
Redis host name | localhost |
X | X |
ATOUM_BUILDER_REDIS_PORT |
Redis port | 6379 |
X | X |
ATOUM_BUILDER_RESQUE_QUEUE |
Resque queue name | atoum |
X | X |
ATOUM_BUILDER_GPG_URL |
URL used to download the GPG key | null |
X | |
ATOUM_BUILDER_GITHUB_TOKEN |
Github API access token | null |
X | |
ATOUM_BUILDER_PUBLIC_URL |
Public URL | null |
X |
To run the builder platform you will have to boot at least two containers: one for the HTTP API and another for the worker:
docker run --rm --name=atoum-builder-api -p 8087:80 -d atoum/builder
docker run --rm --name=atoum-builder-worker -d --entrypoint=php atoum/builder /app/bin/worker.php
Do not forget to define the required environment variables for each container.
The API exposes 2 useful routes:
POST /hook/push/{token}
is used by Github's push webhookPOST /hook/pr/{token}
is used by Github's pull request webhook
There are also two routes to access the API documentation:
GET /docs
to get the JSON definition of the APIGET /swagger
to reach the Swagger UI