Initial commit of docker compose project generator
Creates project directory structure in /docker Creates docker-compose.yml with sensible defaults Creates borgmatic config in /etc/borgmatic.d Adds proxy info to caddyfile and reloads caddy Config file generation done via jsonnet and yq Borgmatic configured to backup to borgbase repo
This commit is contained in:
33
docker-compose.jsonnet
Normal file
33
docker-compose.jsonnet
Normal file
@@ -0,0 +1,33 @@
|
||||
function(
|
||||
project,
|
||||
image,
|
||||
web_port="0000:0000",
|
||||
ports=[],
|
||||
tag="latest",
|
||||
restart="unless-stopped"
|
||||
)
|
||||
|
||||
{
|
||||
"name": project,
|
||||
"services": {
|
||||
"app": {
|
||||
"image": image + ':' + tag,
|
||||
"restart": restart,
|
||||
"ports": std.uniq(std.sort(std.flattenArrays([ports, [web_port]]))),
|
||||
"environment": {
|
||||
"DOCKER_TEMPLATE_CREATED": true
|
||||
},
|
||||
"volumes": [
|
||||
'./data:/data'
|
||||
],
|
||||
"secrets": [
|
||||
'asecret'
|
||||
]
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"asecret": {
|
||||
"file": './secrets/ASECRET'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user