mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-06 15:56:30 +02:00
Update DockerExecution config template and add docker-compose file for deployment
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
// Authentication configuration
|
// Authentication configuration
|
||||||
"Authentication": {
|
"Authentication": {
|
||||||
// List of API keys for authenticating clients
|
// List of API keys for authenticating clients
|
||||||
// Each entry should contain key identification and validation information
|
|
||||||
"ApiKeys": [
|
"ApiKeys": [
|
||||||
// Example:
|
// Example:
|
||||||
// {
|
// {
|
||||||
@@ -44,39 +43,41 @@
|
|||||||
// Docker execution configuration (only used when ExecutionEnvironment = "DockerContainer")
|
// Docker execution configuration (only used when ExecutionEnvironment = "DockerContainer")
|
||||||
"DockerExecution": {
|
"DockerExecution": {
|
||||||
// Docker host URL
|
// Docker host URL
|
||||||
|
// null = uses default Docker client settings
|
||||||
// Linux: "unix:///var/run/docker.sock"
|
// Linux: "unix:///var/run/docker.sock"
|
||||||
// Windows: "npipe://./pipe/docker_engine"
|
// Windows: "npipe://./pipe/docker_engine"
|
||||||
"DockerHost": "unix:///var/run/docker.sock",
|
// Default: null
|
||||||
|
"DockerHost": null,
|
||||||
|
|
||||||
// Docker worker image name to use for task execution
|
// Docker worker image name to use for task execution
|
||||||
// Must be built and available on the Docker host
|
// Must be built and available on the Docker host
|
||||||
// Default: "remoteexec-worker:latest"
|
// Default: "remoteexec-worker:latest"
|
||||||
"WorkerImageName": "remoteexec-worker:latest",
|
"WorkerImageName": "remoteexec-worker:latest",
|
||||||
|
|
||||||
// Maximum execution time per container in seconds
|
// Maximum execution time per container in seconds
|
||||||
// Containers exceeding this time will be forcefully terminated
|
// Containers exceeding this time will be forcefully terminated
|
||||||
// Default: 300 (5 minutes)
|
// Default: 300 (5 minutes)
|
||||||
"ContainerTimeoutSeconds": 300,
|
"ContainerTimeoutSeconds": 300,
|
||||||
|
|
||||||
// Memory limit per container in MB
|
// Memory limit per container in MB
|
||||||
// Prevents containers from consuming excessive memory
|
// Prevents containers from consuming excessive memory
|
||||||
// Default: 512 MB
|
// Default: 512 MB
|
||||||
"ContainerMemoryLimitMb": 512,
|
"ContainerMemoryLimitMb": 512,
|
||||||
|
|
||||||
// CPU shares allocated to each container (relative weight)
|
// CPU shares allocated to each container (relative weight)
|
||||||
// Higher values = more CPU priority
|
// Higher values = more CPU priority
|
||||||
// Default: 1024
|
// Default: 1024
|
||||||
"ContainerCpuShares": 1024,
|
"ContainerCpuShares": 1024,
|
||||||
|
|
||||||
// Disable network access in containers for security
|
// Disable network access in containers for security
|
||||||
// Set to false if tasks require network connectivity
|
// Set to false if tasks require network connectivity
|
||||||
// Default: true
|
// Default: true
|
||||||
"DisableNetwork": true,
|
"DisableNetwork": true,
|
||||||
|
|
||||||
// Make container filesystem read-only
|
// Make container filesystem read-only
|
||||||
// Enhances security by preventing file modifications
|
// Enhances security by preventing file modifications but does not work when additional assemblies are requested at runtime
|
||||||
// Default: true
|
// Default: false
|
||||||
"ReadOnlyFilesystem": true
|
"ReadOnlyFilesystem": false
|
||||||
},
|
},
|
||||||
|
|
||||||
// Server metrics broadcasting configuration
|
// Server metrics broadcasting configuration
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
services:
|
||||||
|
remoteexec-server:
|
||||||
|
image: stonered/remoteexec:latest
|
||||||
|
container_name: remoteexec-server
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
- ASPNETCORE_URLS=http://+:80
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
volumes:
|
||||||
|
# Application configuration (edit the template below then mount here)
|
||||||
|
- ./RemoteExec.Server/appsettings.docker.json:/app/appsettings.json:ro
|
||||||
|
# Mount docker socket only if you will use Execution.ExecutionEnvironment = "DockerContainer"
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
# Optional: timezone sync
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost/health || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
Reference in New Issue
Block a user