instance_html5as.cfg 3.1 KB
Newer Older
1 2
[buildout]
parts =
3
    nginx_conf
4 5
    downloader
    launcher
6
    mime_types
7 8
    publish-connection-information

9 10
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
11
offline = true
12

13 14 15 16 17
# partition tree
# /
# |- etc/
# |    |- nginx.conf
# |    |- run/
18
# |         |- html5as (binary)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
# |- var/
# |    |- run/
# |    |    |- nginx.pid
# |    |- log/
# |    |    |- nginx.log
# |    |    |- nginx.access.log
# |- srv/
# |    |- html5as/ (doc root)
# |    |        |- index.html
# |    |- backup/

[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
35
tmp = $${buildout:directory}/tmp
36 37 38 39 40 41 42 43 44

[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
log = $${rootdirectory:var}/log
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
data = $${rootdirectory:srv}/html5as

45 46 47 48 49 50 51 52
[tempdirectory]
recipe = slapos.cookbook:mkdirectory
client_body_temp_path = $${rootdirectory:tmp}/client_body_temp_path
proxy_temp_path = $${rootdirectory:tmp}/proxy_temp_path
fastcgi_temp_path = $${rootdirectory:tmp}/fastcgi_temp_path
uwsgi_temp_path = $${rootdirectory:tmp}/uwsgi_temp_path
scgi_temp_path = $${rootdirectory:tmp}/scgi_temp_path

53
[html5as]
54
# Options
55
nb_workers = 2
56 57 58 59 60 61 62

# Network
ip = $${slap-network-information:global-ipv6}
port = 8080

# Paths
# Log
63 64 65 66
path_pid = $${basedirectory:run}/nginx.pid
path_log = $${basedirectory:log}/nginx.log
path_access_log = $${basedirectory:log}/nginx.access.log
path_error_log = $${basedirectory:log}/nginx.error.log
67 68 69
path_tmp = $${buildout:directory}/tmp
# Docroot
docroot = $${basedirectory:data}
70
default_index = $${basedirectory:data}/index.html
71 72
# Config files
path_nginx_conf = $${rootdirectory:etc}/nginx.conf
73
path_mime_types = $${rootdirectory:etc}/mime_types
74 75
# Executables
bin_nginx = ${nginx:location}/sbin/nginx
76 77
bin_launcher = $${basedirectory:services}/launcher
bin_downloader = $${basedirectory:services}/downloader
78 79

# Utils
80
path_shell = ${dash:location}/bin/dash
81
path_curl = ${curl:location}/bin/curl
82
path_tar = ${tar:location}/bin/tar
83 84 85

[nginx_conf]
recipe = slapos.recipe.template:jinja2
86
template = ${template_nginx_conf:location}/${template_nginx_conf:filename}
87
rendered = $${html5as:path_nginx_conf}
88 89 90
context = 
    section param_html5as html5as
    section param_tempdir tempdirectory
91

92 93 94 95 96
[mime_types]
recipe = slapos.recipe.template:jinja2
template = ${template_mime_types:location}/${template_mime_types:filename}
rendered = $${html5as:path_mime_types}

97
[downloader]
98
recipe = slapos.recipe.template:jinja2
99 100
template = ${template_downloader:location}/${template_downloader:filename}
rendered = $${html5as:bin_downloader}
101
mode = 700
102 103 104
context = 
    section param_html5as html5as
    key download_url slap-parameter:download_url
105

106 107 108 109 110 111 112 113
[launcher]
recipe = slapos.recipe.template:jinja2
template = ${template_launcher:location}/${template_launcher:filename}
rendered = $${html5as:bin_launcher}
mode = 700
context = 
    section param_html5as html5as

114 115 116
[publish-connection-information]
recipe = slapos.cookbook:publish
server_url = http://[$${html5as:ip}]:$${html5as:port}