-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbase.cfg
109 lines (92 loc) · 3.33 KB
/
base.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}
[scripts]
recipe = zc.recipe.egg:scripts
eggs = ${buildout:eggs}
dependent-scripts = true
[postgres]
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v${settings:postgres_version}/postgresql-${settings:postgres_version}.tar.bz2
keep-compile-dir = true
configure-options = --with-pgport=${odoo:options.db_port}
[postgres-conf]
recipe = collective.recipe.template
input = ${buildout:templates-directory}/postgresql.conf.in
output = ${buildout:config-directory}/postgresql.conf
[pg-hba-conf]
recipe = collective.recipe.template
input = ${buildout:templates-directory}/pg_hba.conf.in
output = ${buildout:config-directory}/pg_hba.conf
[pg-ident-conf]
recipe = collective.recipe.template
input = ${buildout:templates-directory}/pg_ident.conf.in
output = ${buildout:config-directory}/pg_ident.conf
[psycopg2]
recipe = zc.recipe.egg:custom
egg = psycopg2
include-dirs = ${postgres:location}/include
library-dirs = ${postgres:location}/lib
rpath = ${postgres:location}/lib
[initdb]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds =
test -e ${buildout:directory}/data ||
${postgres:location}/bin/initdb ${buildout:directory}/data
test -e ${buildout:bin-directory}/psql ||
ln -s ${postgres:location}/bin/psql ${buildout:bin-directory}
echo ""
echo "To start PosrgreSQL and Supervisord run:"
echo "$ supervisord"
echo ""
# echo "To create the database run:"
# echo "$ psql -d postgres -c 'CREATE DATABASE ${odoo:options.db_name}'"
# echo ""
# echo "To shutdown Supervisord with all deamons run:"
# echo "$ supervisorctl shutdown"
# echo ""
# echo "To Restart Postgres run:"
# echo "$ supervisorctl restart postgres"
# echo ""
# echo "To start Odoo run:"
# echo "$ start_odoo"
# echo ""
${postgres:location}/bin/psql -d postgres -c 'CREATE DATABASE ${odoo:options.db_name}'
test -e ${buildout:directory}/dump.sql || ${postgres:location}/bin/psql -d ${odoo:options.db_name} < ${buildout:directory}/dump.sql
${buildout:bin-directory}/upgrade_odoo
[supervisor-cron]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord -c ${buildout:config-directory}/parts/supervisord/supervisord.conf
[odoo]
#recipe = anybox.recipe.odoo[bzr]:server
recipe = anybox.recipe.odoo:server
version = ${settings:odoo_version}
#addons = bzr lp:openerp-spain openerp-spain last:1
eggs = unidecode
options.db_host = ${settings:postgres_host}
options.db_name = ${settings:postgres_db_name}
options.db_user = ${settings:postgres_user}
options.db_password = ${settings:postgres_password}
options.db_maxconn = ${settings:postgres_maxconn}
options.db_port = ${settings:postgres_port}
options.xmlrpc_port = ${settings:odoo_xmlrpc_port}
options.xmlrpcs_port = ${settings:odoo_xmlrpcs_port}
openerp_scripts = update=custom_update arguments=session
[env]
recipe = gocept.recipe.env
[supervisor]
recipe = collective.recipe.supervisor
port = ${settings:supervisor_port}
serverurl = ${settings:supervisor_url}:${supervisor:port}
programs =
10 postgres ${postgres:location}/bin/postmaster [ --config-file=${buildout:config-directory}/postgresql.conf ]
10 odoo ${buildout:directory}/bin/start_odoo
[py]
recipe = zc.recipe.egg
eggs = ${buildout:eggs}
interpreter = py
scripts = py