The GitHub Automation App can be deployed using Docker and Docker Compose to run as a service with configurable resource and operation settings. Multiple services can be run simultaneously using different configurations.
Make sure the following installed on the system:
- Docker: Get Docker
- Docker Compose: Get Docker Compose
.
├── configs/
│ ├── operations/
│ │ └── sample-operation.yml
│ └── resources/
│ └── sample-resource.yml
├── docker/
│ ├── Dockerfile
│ └── docker-compose.yml
The docker-compose.yml
is configured to use a Node.js image and to run the app. This mounts the project directory to the container for live reloading.
The Dockerfile is used to create a Docker image for the app.
The compose.yml file sets up a service (automation-app) to run the app:
This allows to run multiple instances of the service with different configurations and ports.
PORT=8080 RESOURCE_CONFIG=configs/resources/sample-resource.yml OPERATION_CONFIG=configs/operations/sample-operation.yml docker-compose -p automation-app-1 up -d
PORT=8081 RESOURCE_CONFIG=configs/resources/sample-resource.yml OPERATION_CONFIG=configs/operations/sample-operation-2.yml docker-compose -p automation-app-2 up -d