2017-01-12 13:11:01 +03:00
# Surok app config file
2017-01-12 12:43:30 +03:00
conf.d/myapp.json
```
{
"services": [
{
2017-02-07 12:41:43 +03:00
"name": "kioskservice",
"group": "production.romania",
"ports": ["web", "socket"]
2017-01-12 12:43:30 +03:00
}
],
2017-02-07 13:17:20 +03:00
"discovery": "mesos_dns",
"group": "dev.web",
2017-02-07 12:41:43 +03:00
"conf_name": "kiosk",
"template": "/etc/surok/templates/kiosk.jj2",
"dest": "/etc/nginx/sites-available/kioskservice.conf",
"reload_cmd": "/sbin/nginx -t & & /bin/systemctl reload nginx",
"run_cmd": ["/usr/bin/node", "-c", "config.json"]
2017-01-12 12:43:30 +03:00
}
```
* **services**. List of hashes with required services for app.
2017-01-25 13:11:51 +03:00
1. _name_ - string. App name in Marathon. If you use a Marathon discovery, you can use the "*" at the end of the string to indicate any character.
2017-01-12 12:43:30 +03:00
2. _group_ - string. App group in Marathon. Optional. Discovery policy: 1) config 2) SUROK_DISCOVERY_GROUP environment variable 3) Marathon API
2017-01-25 13:11:51 +03:00
3. _ports_ - list. Name of opened port. In marathon of course. If you use a Marathon discovery, you can use the "*" at the end of the string to indicate any character. Optional.
2017-01-12 12:43:30 +03:00
* **conf_name**. Unique app config name.
* **template**. Jinja2 template location.
* **dest**. Destination config path.
2017-01-12 13:11:01 +03:00
* **reload_cmd**. Command to execute if generated config is changed.
2017-02-07 13:17:20 +03:00
* **discovery**. Use custom discovery for app.
* **group**. Default group for all required services.