You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
While YAML files are easy to process, an alternative config schema may be easier to maintain.
The suggested schema is a block-based config schema. The idea of configuration blocks is easier to grasp, as the documentation would describe the structure of each block and where they can be used.
Similar schemas:
Jenkins' Jenkinsfile, using Apache Groovy (requires Java -> can't use that)
Usecase:
I want to serve the application running inside the service "myservice" on port 8080 on the domain "mydomain.com" on port 80. It should require Basic Authentication with username "user" and password "pass".
The application has a WebSocket endpoint on path /socket.
container:
services:
- name: app # service nameimage: nginxdemos/hello:latest # Docker image namevolumes:
- type: global # mount the "config" folder inside container at "/var/config". As both services use "global" they will mount the same source and share data.src: configdest: /var/config
- type: local # mount the "data" folder inside container at "/var/data". This folder is not shared with other services ("local").src: datadest: /var/data
- type: custom # mount the "/docker/data/test" folder inside container at "/var/test".src: /docker/data/testdest: /var/testhooks:
execute_after_setup: ./setup.sh # this file is executed inside container after the container is createdexecute_before_destroy: ./destroy.sh # this file is executed inside container before the container is destroyed
- name: db # service nameimage: mariadb:10.5 # Docker image nameenvironment: # environment variables for Docker containerMYSQL_ROOT_PASSWORD: examplevolumes_from: app:ro # mount all volumes from app service as readonly
New
service app {
image = nginxdemos/hello:latest
volume {
type = global # mount the "config" folder inside container at "/var/config". As both services use "global" they will mount the same source and share data.
src = config
dest = /var/config
}
volume {
type = local # mount the "data" folder inside container at "/var/data". This folder is not shared with other services ("local").
src = data
dest = /var/data
}
volume {
type = custom # mount the "/docker/data/test" folder inside container at "/var/test".
src = /docker/data/test
dest = /var/test
}
hook after_setup {
exec = ./setup.sh
}
hook before_destroy {
exec = ./destroy.sh
}
}
service db {
image = mariadb:10.5
volumes_from = app:ro
environment {
MYSQL_ROOT_PASSWORD = example
}
}
While YAML files are easy to process, an alternative config schema may be easier to maintain.
The suggested schema is a block-based config schema. The idea of configuration blocks is easier to grasp, as the documentation would describe the structure of each block and where they can be used.
Similar schemas:
Domain declaration
Usecase:
I want to serve the application running inside the service "myservice" on port 8080 on the domain "mydomain.com" on port 80. It should require Basic Authentication with username "user" and password "pass".
The application has a WebSocket endpoint on path /socket.
Old
Taken from documentation
New
The
security
block may be defined globally, inside a domain block or inside a port definition.Service declaration
Old
Taken from documentation
New
Registry declaration
Old
Taken from documentation
New
The text was updated successfully, but these errors were encountered: