Package: wodoo
Odoo Docker FrameworkProvides functionalities:setup empty new odoo with one bash commandodoo init --version 15.0setup full fleged odoo server environment containingsupports MANIFEST file in odoo root directory to install and uninstall modulespostgres with pg_activity, enhanced pgclifake webmail to receive AND SEND mailslogs.io integration to display container output on web browserdividing web, cron, queuejob container per defaultprogress bar on postgres dump/restorefzf compatible creation of and AST of your projectfast restore / create snapshots of complete databases using btrfs, which helps testing things on customer databasesHow to installInstall minimumpipxinstallwodoooptional: To be not blocked when working on btrfs/zfs volumes and so, this is suggested on dev machines:cat<< 'EOF' > /etc/sudoers.d/odooCmnd_Alias ODOO_COMMANDS_ODOO = /usr/bin/find *, /var/lib/wodoo_env/bin/odoo *, /usr/bin/btrfs subvolume *, /usr/bin/mkdir *, /usr/bin/mv *, /usr/bin/rsync *, /usr/bin/rm *,  /usr/bin/du *, /usr/local/bin/odoo *, /usr/bin/btrfs subvol show *, /usr/sbin/gosu *odoo ALL=NOPASSWD:SETENV: ODOO_COMMANDS_ODOOEOFHow To: Make new empty odoo instanceodooinit<folder>cd<folder>
odooreload
odoo-fdbreset
odooup-d# now open browser on http://localhostHow to extend odoo docker imagemake folderdocker/appendix_odooin your source repostart with a letter before "o" - docker-compose names services in alphabetical order and the appendix container must existbeforeodoo is builtadd file:# docker/appendix_odoo/docker-compose.yml# manage-order 1services:appendix_odoo:build:context:$CUSTOMS_DIR/docker/appendix_odoodockerfile:$CUSTOMS_DIR/docker/appendix_odoo/Dockerfileadd Docker file:# docker/appendix_odoo/DockerfileFROMubuntu:22.04RUNaptupdate&&\aptinstall-ytar&&\mkdir/tmp/packADDibm-iaccess-1.1.0.27-1.0.amd64.deb/tmp/packADDinstall.sh/tmp/pack/install.shADDodbc.ini/tmp/pack/odbc.iniRUNchmoda+x/tmp/pack/install.shRUNtarcfz/odoo_install_appendix.tar.gz/tmp/packadd docker/appendix_odoo/Dockerfile.appendixCOPY--from=${PROJECT_NAME}_appendix_odoo/odoo_install_appendix.tar.gz/tmp/install_appendix.tar.gz
RUN\mkdir/tmp/install_package&&\cd/tmp/install_package&&\tarxfz/tmp/install_appendix.tar.gz&&\ls-lhtra&&\./install.shStore settings in ./odoo of source codeHow to extend an existing servicemake a docker-compose file like ~/.odoo/docker-compose.ymlservices:
  odoo3:
    labels:
      compose.merge: base-machine
    environment:
      WHAT YOU WANT
    volumes:
      WHAT YOU WANTExample for fixed ip addressesservices:
    proxy:
        networks:
            network1:
                ipv4_address: 10.5.0.6
networks:
    network1:
        driver: bridge
        ipam:
            config:
                - subnet: 10.5.0.0/16Some labelsservices:
    new_machine:
        ...
        labels:
          odoo_framework.apply_env: 0  # do not apply global environment from settings hereUsing the registryPushingConfigure HUB_URL on the pusher side.>odoo login>odoo build>odoo regpushAll images even base images like redis are pushed; tag name contains SHA namePullingConfigureREGISTRY=1in settings and setupHUB_URL>odoo login>odoo regpullAll images will be pulled from registryServices ExplainedProxynodejs applicationbetween user browser and odooif odoo is being restarted catches the requests, holds them and releases them to odoo if it is up againmanages handling of /longpolling path; so if used in custom proxy setups, just refer to that one port hereToolsBackup and Restoreodoo backup odoo-db <path> (or default name used)
odoo restore odoo-db <path> (or select from list)Show Database activityodoo pgactivityConfigurations in ~/.odoo/settings explainedSettingDescriptionPROJECT_NAMEPasted into container names, postgres volumes and so on; please keep it as short as possible, as there are limits example docker containername 53 characters at time of writingDBNAMEUses projectname or a configured oneHUB_URL=valueuser:password@host:port/paths.. to configureREGISTRY=1Rewrites all build and images urls to HUB_URL. Should be used on production systems to force pull only from registry and block any local buildings.POSTGRES_VERSION=13Choose from 11, 12, 13, 14, 16ODOO_ENABLE_DB_MANAGEREnables the odoo db managerDEVMODE=1At restore runs safety scripts to disable cronjobs and mailserver and resets passwordsRUN_PROXY=1If the built-in nodejs proxy is enabledRUN_PROXY_PUBLISHED=0/1If the proxy is reachable from outside the docker network example from 127.0.0.1:8069PROXY_PORTThe port on which you can access with plain http the odooODOO_IMAGES_BRANCHThe branch used for ~/.odoo/imagesODOO_INSTALL_LIBPOSTAL=1If set, then the libpostal lib is installedODOO_QUEUEJOBS_CRON_IN_ONE_CONTAINER=1Runs queuejobs and cronjob in the odoo container where also the web application residesODOO_QUEUEJOBS_CHANNELS=root:40,magento2:1Configures queues for queuejob moduleNAMED_ODOO_POSTGRES_VOLUMEUse a specific external volume; not dropped with down -v commandCRONJOB_DADDY_CLEANUP=0 */1 * * * ${JOB_DADDY_CLEANUP}Turn on grandfather-principle based backupRESTART_CONTAINERS=1Sets "restart unless-stopped" policyODOO_WORKERS_WEBAmount of web workers in odoo (default currently 28)WEB_BASE_URLurl - is set at startupODOO_MAX_CRON_THREADSAmount of cronworkersOdoo Server Configuration in ~/.odoo/settings/odoo.config and odoo.config.${PROJECT_NAME}Contents will be appended to [options] section of standard odoo configuration.Configuration may simple look like:setting1=value1or like that:[options]
setting1=value1

[queue_job]
settingqj=valueqjThe [options] is prepended automatically if missed.PytestsBest executed with:timesudo-EpytestPerformance Checkpipxrunpipwodooinstallline_profiler~/.local/pipx/venvs/wodoo/bin/python3-mkernprof-l-vodooreload