This repository has been archived on 2024-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
flow-packer/jsonnet/lib/provisioners.libsonnet

58 lines
1.6 KiB
Text
Raw Normal View History

{
installBash: {
shell: {
inline: ['apk add bash'],
},
},
uploadDockerCompose(root_setup_directory): {
file: {
source: '${path.root}/../files/compose/docker-compose.yaml',
destination: std.format('%s/template/compose/', root_setup_directory),
},
},
uploadBootstrapScript(root_setup_directory): {
file: {
source: '${path.root}/../files/scripts/bootstrap.sh',
destination: std.format('%s/bootstrap.sh', root_setup_directory),
},
},
uploadTraefikTemplates(root_setup_directory): {
file: {
sources: [
'${path.root}/../files/traefik/Dockerfile',
'${path.root}/../files/traefik/dynamic_dashboard.yaml',
'${path.root}/../files/traefik/entrypoint.sh',
'${path.root}/../files/traefik/traefik.yaml',
],
destination: std.format('%s/template/traefik/', root_setup_directory),
},
},
uploadGiteaTemplates(root_setup_directory): {
file: {
sources: [
'${path.root}/../files/gitea/app.ini',
'${path.root}/../files/gitea/Dockerfile',
'${path.root}/../files/gitea/dynamic_git.yaml',
'${path.root}/../files/gitea/entrypoint.sh',
],
destination: std.format('%s/template/gitea/', root_setup_directory),
},
},
runSetup(username, gid, uid, root_setup_directory): {
shell: {
environment_vars: [
std.format('FLOW_USERNAME=%s', username),
std.format('FLOW_GID=%d', gid),
std.format('FLOW_UID=%d', uid),
std.format('ROOT_SETUP_DIRECTORY=%s', root_setup_directory),
],
script: '${path.root}/../provisioners/shell/setup.sh',
},
},
}