[ADD]OpenERP 6.0 Server, addons, Web client

This commit is contained in:
Fabien BOURGEOIS 2018-04-30 18:31:04 +02:00
parent f07a94dc94
commit 88db6df350
11 changed files with 335 additions and 0 deletions

View File

@ -30,6 +30,32 @@ services:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: somethingToChange
openerp60:
init: true
build:
context: ./odoo
dockerfile: Dockerfile.60
image: registry.yaltik.net/openerp:yaltik60
environment:
XMLRPC_PORT: 8069
NETRPC_PORT: 8070
ADMIN_PASSWORD: admin
POSTGRES_USER: openerp
POSTGRES_PASSWORD: somethingToChange
openerpweb60:
init: true
build:
context: ./odoo
dockerfile: Dockerfile.web.60
image: registry.yaltik.net/openerpweb:yaltik60
environment:
WEB_PORT: 8080
OPENERP_HOST: openerp60
OPENERP_PORT: 8069
OPENERP_PROTOCOL: http
PROXY_MODE: "False"
odoo9:
init: true
build:

55
odoo/odoo/Dockerfile.60 Normal file
View File

@ -0,0 +1,55 @@
FROM centos:6
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
# OpenERP dependencies from CentOS
RUN yum update -y
RUN yum install -y python-devel pychart python-dateutil python-reportlab \
python-lxml python-psycopg2 python-mako python-setuptools pytz PyYAML graphviz \
python-imaging wget git unzip gcc
# RUN yum groupinstall -y "Development Tools"
# Install OpenERP dependencies not available from CentOS6 repo
RUN easy_install pydot==1.0.29
RUN easy_install vobject==0.8.2
RUN easy_install PyWebDAV==0.9.4.1
# Alternative : home install PyWebDAV, not useless finally
# RUN wget https://files.pythonhosted.org/packages/e9/14/5f2a654233e533797f32dd670dab8dd61ac974d5105950481e872bddb898/PyWebDAV-0.9.8.tar.gz
# RUN tar xzf PyWebDAV-0.9.8.tar.gz
# WORKDIR /PyWebDAV-0.9.8
# RUN python setup.py develop
# Create odoo user
RUN useradd odoo -md /opt/odoo
ENV ODOO_BRANCH 6.0
WORKDIR /opt/odoo
# Default user : odoo
USER odoo
# Install Odoo v6.0
RUN mkdir -p pipcache data backups extra-addons custom-addons www/html/
RUN wget https://github.com/odoo/odoo/archive/${ODOO_BRANCH}.zip
RUN unzip ${ODOO_BRANCH}.zip && rm ${ODOO_BRANCH}.zip
RUN mv odoo-${ODOO_BRANCH} odoo
# RUN git clone -b ${ODOO_BRANCH} --depth 1 https://github.com/odoo/odoo.git
USER root
WORKDIR /opt/odoo/odoo/
RUN python setup.py install
# OpenERP 6 extra addons was used, so install it... and its dependencies
# RUN easy_install bzr
# RUN bzr init-repo extra-addons
# RUN bzr branch lp:openobject-addons/extra-6.0 extra-addons/6.0
WORKDIR /opt/odoo/
COPY openerp-extra-60.zip ./
RUN unzip openerp-extra-60.zip && rm openerp-extra-60.zip
RUN easy_install egenix-mx-base
# Prepare launch
USER odoo
COPY genconf60.sh genconf.sh
COPY launch60.sh launch.sh
EXPOSE 8069 8070 8071
CMD bash launch.sh

View File

@ -0,0 +1,48 @@
FROM centos:6
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
# OpenERP dependencies from CentOS
# RUN yum update -y
RUN yum install -y python-devel python-lxml python-psycopg2 python-mako \
python-setuptools wget git gcc
# RUN yum groupinstall -y "Development Tools"
# PIP
# RUN easy_install setuptools
# RUN wget https://bootstrap.pypa.io/get-pip.py
# RUN python get-pip.py
# RUN pip install --upgrade pip setuptools wheel
# Create odoo user
RUN useradd odoo -md /opt/odoo
WORKDIR /opt/odoo
USER odoo
RUN mkdir -p /opt/odoo/log/openerp-web
# Web Client
RUN wget https://launchpad.net/openobject-client-web/6.0/6.0.4/+download/openerp-web-6.0.4.tar.gz
RUN tar xzf openerp-web-6.0.4.tar.gz && rm openerp-web-6.0.4.tar.gz
RUN mv openerp-web-6.0.4 openerp-web
# COPY requirementsweb60.txt requirements.txt
# Replace >= to exact versions on scripts
RUN sed -i -- 's/>=/==/g' openerp-web/setup.py
RUN sed -i -- 's/>=/==/g' openerp-web/lib/populate.sh
# Babel specific : no version available prior to 0.9.6
RUN sed -i -- 's/0.9.4/0.9.6/g' openerp-web/setup.py
RUN sed -i -- 's/0.9.4/0.9.6/g' openerp-web/lib/populate.sh
USER root
# RUN pip install -r requirements.txt
WORKDIR /opt/odoo/openerp-web/lib
RUN bash populate.sh
WORKDIR /opt/odoo/openerp-web
RUN python setup.py install
USER odoo
WORKDIR /opt/odoo
COPY genconfweb60.sh genconf.sh
COPY launchweb60.sh launch.sh
CMD bash launch.sh

30
odoo/odoo/genconf60.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
CONF=/opt/odoo/openerp-server.conf
ADDONS_PATH="/opt/odoo/odoo/addons,/opt/odoo/openerp-extra-60"
# Configuration generation
echo "
[options]
; Configuration file auto-generated
without_demo = True
upgrade = False
verbose = False
netrpc = True
netrpc_port = ${NETRPC_PORT:=8070}
xmlrpc = True
xmlrpc_port = ${XMLRPC_PORT:=8069}
db_host = ${DB_HOST:=postgres}
db_port = ${DB_PORT:=5432}
db_user = $POSTGRES_USER
db_password = $POSTGRES_PASSWORD
root_path = None
soap = False
translate_modules = ['all']
demo = {}
addons_path = ${ADDONS_PATH}
reportgz = False
static_http_enable = false
static_http_document_root = /opt/odoo/www/html
static_http_url_prefix = /
admin_passwd = ${ADMIN_PASSWORD:=admin}" > $CONF

38
odoo/odoo/genconfweb60.sh Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
CONF=/opt/odoo/openerp-web.cfg
# Configuration generation
echo "
[global]
# Configuration file auto-generated
server.environment = 'development'
server.socket_host = '0.0.0.0'
server.socket_port = ${WEB_PORT:=8080}
server.thread_pool = 10
tools.sessions.on = True
tools.sessions.persistent = False
server.profile_on = False
server.profile_dir = 'profile'
tools.encode.encoding='utf-8'
tools.proxy.on = ${PROXY_MODE:=True}
log.screen = False
log.access_file = '/opt/odoo/log/openerp-web/access.log'
log.error_file = '/opt/odoo/log/openerp-web/error.log'
log.access_level = 'INFO'
log.error_level = 'INFO'
tools.csrf.on = True
tools.log_tracebacks.on: False
tools.cgitb.on: True
tools.cgitb.ignore=(
openobject.errors.Concurrency,
openobject.errors.TinyException)
openerp.server.host = '${OPENERP_HOST:=openerp}'
openerp.server.port = '${OPENERP_PORT:=8070}'
openerp.server.protocol = '${OPENERP_PROTOCOL:=socket}'
openerp.server.timeout = 900
[openerp-web]
dblist.filter = 'NONE'
dbbutton.visible = True
company.url = ''" > $CONF

8
odoo/odoo/launch60.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.6/site-packages/openerp-server/addons"
CONF=/opt/odoo/openerp-server.conf
ODOOCMD="openerp-server --config $CONF"
# Configuration generation and Odoo launch
bash genconf.sh && $ODOOCMD

7
odoo/odoo/launchweb60.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
CONF=/opt/odoo/openerp-web.cfg
ODOOCMD="openerp-web -c $CONF"
# Configuration generation and Odoo launch
bash genconf.sh && $ODOOCMD

Binary file not shown.

View File

@ -0,0 +1,34 @@
[options]
without_demo = True
; This is the password that allows database operations:
; admin_passwd = admin
upgrade = False
verbose = False
netrpc = True
; netrpc_interface =
; netrpc_port =
xmlrpc = True
; xmlrpc_interface =
xmlrpc_port = 8069
db_host = False
db_port = False
; Please uncomment the following line *after* you have created the
; database. It activates the auto module check on startup.
; db_name = terp
db_user = openerp
db_password = False
; Uncomment these for xml-rpc over SSL
; secure = True
; secure_cert_file = /etc/openerp/server.cert
; secure_pkey_file = /etc/openerp/server.key
root_path = None
soap = False
translate_modules = ['all']
demo = {}
addons_path = None
reportgz = False
; Static http parameters
static_http_enable = False
static_http_document_root = /var/www/html
static_http_url_prefix = /

View File

@ -0,0 +1,79 @@
[global]
server.environment = "development"
# Some server parameters that you may want to tweak
server.socket_host = "0.0.0.0"
server.socket_port = 8080
# Sets the number of threads the server uses
server.thread_pool = 10
tools.sessions.on = True
tools.sessions.persistent = False
# Simple code profiling
server.profile_on = False
server.profile_dir = "profile"
tools.encode.encoding="utf-8"
# if this is part of a larger site, you can set the path
# to the TurboGears instance here
#server.webpath = ""
# Set to True if you are deploying your App behind a proxy
# e.g. Apache using mod_proxy
#tools.proxy.on = True
# If your proxy does not add the X-Forwarded-Host header, set
# the following to the *public* host url.
#tools.proxy.base = 'http://mydomain.com'
# logging
#log.screen = False
#log.access_file = "/var/log/openerp-web/access.log"
#log.error_file = "/var/log/openerp-web/error.log"
log.access_level = "INFO"
log.error_level = "INFO"
# Replaces the cherrypy-created FileHandler by a TimedRotatingFileHandler,
# requires that access_file and error_file be uncommented and set correctly
# (they will be used to configure the rotating file handlers).
# Value should be a dictionary providing TimedRotatingFileHandler's optional
# arguments (any argument can be provided but `filename`).
# See the documentation at http://docs.python.org/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler
# for more informations on TimedRotatingFileHandler
#log.rotate = {'when' : 'midnight'}
# Set to false to disable CSRF checks
tools.csrf.on = True
# replace builtin traceback tools by cgitb
tools.log_tracebacks.on: False
tools.cgitb.on: True
# a default install can probably avoid logging those via cgitb as they're
# available in the server log
tools.cgitb.ignore=(
openobject.errors.Concurrency,
openobject.errors.TinyException)
# OpenERP Server
openerp.server.host = 'localhost'
openerp.server.port = '8070'
openerp.server.protocol = 'socket'
openerp.server.timeout = 450
# Web client settings
[openerp-web]
# filter dblists based on url pattern?
# NONE: No Filter
# EXACT: Exact Hostname
# UNDERSCORE: Hostname_
# BOTH: Exact Hostname or Hostname_
dblist.filter = 'NONE'
# whether to show Databases button on Login screen or not
dbbutton.visible = True
# will be applied on company logo
company.url = ''

View File

@ -0,0 +1,10 @@
CherryPy==3.1.2
Babel==0.9.6
Mako==0.2.4
simplejson==2.0.9
formencode==1.2.2
pyparsing==1.5.2
pytz==2009j
xlwt==0.7
python-dateutil==1.4.1
simplejson==2.0.9