{"id":15141771,"url":"https://github.com/mabt-tech-com/docker-odoo17","last_synced_at":"2026-02-03T16:03:36.422Z","repository":{"id":253799851,"uuid":"844566666","full_name":"mabt-tech-com/Docker-Odoo17","owner":"mabt-tech-com","description":"Odoo 17 Docker setup with PostgreSQL, Supervisor, and single volume for persistent data storage.","archived":false,"fork":false,"pushed_at":"2024-08-27T17:56:34.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-06T14:24:55.038Z","etag":null,"topics":["containerization","docker","docker-hub","docker-image","docker-volume","odoo17","ubuntu-server","verified","vps"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/iifast2/odoo17-img","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mabt-tech-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T14:17:56.000Z","updated_at":"2024-08-27T17:56:38.000Z","dependencies_parsed_at":"2024-08-27T18:07:33.571Z","dependency_job_id":null,"html_url":"https://github.com/mabt-tech-com/Docker-Odoo17","commit_stats":null,"previous_names":["mabt-tech-com/docker-odoo17"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabt-tech-com%2FDocker-Odoo17","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabt-tech-com%2FDocker-Odoo17/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabt-tech-com%2FDocker-Odoo17/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabt-tech-com%2FDocker-Odoo17/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mabt-tech-com","download_url":"https://codeload.github.com/mabt-tech-com/Docker-Odoo17/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247493827,"owners_count":20947781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerization","docker","docker-hub","docker-image","docker-volume","odoo17","ubuntu-server","verified","vps"],"created_at":"2024-09-26T09:01:51.784Z","updated_at":"2026-02-03T16:03:36.364Z","avatar_url":"https://github.com/mabt-tech-com.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Odoo 17 Docker Setup with Single Volume\n\nThis guide will help you set up Odoo 17 in a Docker container with a single volume for persistent data storage. You can use this guide to run the setup on both **Docker Desktop (Windows)** and **Ubuntu Server VPS**.\n\n## Prerequisites\n\n- **Docker Desktop** installed on **Windows** or **Docker** installed on **Ubuntu Server VPS**.\n- An Odoo 17 Docker image (`iifast2/odoo17-img:1.0`) with PostgreSQL and Supervisor installed.\n\n## Dockerfile Overview\n\nHere is the Dockerfile used to set up Odoo with a single volume that stores all necessary files (PostgreSQL data, Odoo logs, and configuration):\n\n```dockerfile\n# Use your pulled Docker image as the base image\nFROM iifast2/odoo17-img:1.0\n\n# Update and install necessary packages if missing\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    postgresql \\\n    supervisor \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Expose the necessary port for Odoo\nEXPOSE 8069\n\n# Define a single Docker volume for all necessary files\nVOLUME [\"/data\"]\n\n# Command to start all necessary services when the container is run\nCMD service postgresql start \u0026\u0026 \\\n    service supervisor start \u0026\u0026 \\\n    supervisorctl start odoo17 \u0026\u0026 \\\n    tail -f /data/odoo17/odoo17.log\n```\n\nThis Dockerfile does the following:\n\n* Installs PostgreSQL and Supervisor (if needed).\n* Exposes port `8069` for Odoo’s web interface.\n* Defines a single volume (`/data`) where PostgreSQL data, Odoo logs, and configuration files will be stored.\n* Starts PostgreSQL, Supervisor, and Odoo when the container is run.\n\n\n## Running the Container on Docker Desktop (Windows)\n\n### Step 1: Prepare the Host Directory\nCreate a directory on your Windows machine that will serve as the persistent volume for the container. For example:\n\n```\nC:/Users/yourusername/Desktop/odoo-data\n```\n\n### Step 2: Run the Container\nUse the following command to run the container with the volume mapped to your host directory:\n\n```\ndocker run -d -p 8069:8069 --name odoo17-container \\\n  -v C:/Users/yourusername/Desktop/odoo-data:/data \\\n  odoo17-img-with-services\n```\n\n**Explanation:**\n\n* `-p 8069:8069`: Maps port 8069 on the container to port 8069 on your Windows machine. You will access Odoo at `http://localhost:8069`.\n* `-v C:/Users/yourusername/Desktop/odoo-data:/data`: Maps your host directory (`C:/Users/yourusername/Desktop/odoo-data`) to the container's `/data` directory. This will store PostgreSQL data, Odoo logs, and configuration files in a single location on your Windows machine.\n* `odoo17-img-with-services`: The Docker image that runs Odoo, PostgreSQL, and Supervisor.\n\n### Step 3: Access Odoo\nAfter the container is running, open your web browser and navigate to:\n\n``` \nhttp://localhost:8069\n```\n\nYou should see the Odoo web interface.\n\n## Running the Container on Ubuntu Server VPS\n\n### Step 1: Prepare the Host Directory\n\nCreate a directory on your Ubuntu VPS that will serve as the persistent volume for the container. For example:\n\n```\nmkdir -p /path/on/host/data\n```\n\n### Step 2: Run the Container\n\nUse the following command to run the container on your Ubuntu VPS:\n\n```\ndocker run -d -p 8069:8069 --name odoo17-container \\\n  -v /path/on/host/data:/data \\\n  odoo17-img-with-services\n```\n\n**Explanation:**\n* `-p 8069:8069`: Maps port `8069` on the container to port `8069` on your VPS. You will access Odoo at `http://\u003cyour-vps-ip\u003e:8069`.\n* `-v /path/on/host/data:/data`: Maps your host directory on the VPS (`/path/on/host/data`) to the container's `/data` directory. This will store PostgreSQL data, Odoo logs, and configuration files in a single location on your VPS.\n\n### Step 3: Access Odoo\nOnce the container is running, access Odoo by opening your browser and navigating to:\n\n```\nhttp://\u003cyour-vps-ip\u003e:8069\n```\n\nYou should see the Odoo web interface.\n\n## Understanding the Volume Mapping\nThe `-v` flag maps a directory on your host machine to a directory inside the **Docker container**. This allows you to persist files across container restarts, and makes it easier to access or manage these files.\n\n* **On Windows:** The host directory might look like `C:/Users/yourusername/Desktop/odoo-data`.\n* **On Ubuntu VPS:** The host directory might look like `/path/on/host/data`.\nInside the container, the mapped directory is `/data`, and it contains:\n\n* `/data/postgresql`: PostgreSQL data for your Odoo database.\n* `/data/odoo17`: Odoo log files.\n* `/data/config`: Configuration files for Odoo.\nThis setup consolidates everything into a single volume, making backups and management much simpler.\n\n## Troubleshooting\nContainer Exits Immediately After Starting\nIf the container exits immediately, check the logs using:\n\n```\ndocker logs odoo17-container\n```\n\nThis will provide details about what might have gone wrong during startup.\n\n### File Permissions\nIf you encounter permission issues accessing the files in the volume, ensure that the permissions on the host directory are set correctly. You may need to adjust file permissions or ownership.\n\n## Conclusion\nThis setup allows you to run Odoo in a Docker container while persisting important files such as logs, configuration, and databases using a single volume. This makes it easy to access and manage files from both Windows and Ubuntu Server VPS.\n\n\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n---\n---\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n\n# Run instructions \u0026 Dockerfile : \n\n```\n# Use your pulled Docker image as the base image\nFROM iifast2/odoo17-img:1.0\n\n# Update and install necessary packages\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    postgresql \\\n    supervisor \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Copy your custom supervisor configuration file if you have one\n# COPY odoo17.conf /etc/supervisor/conf.d/odoo17.conf\n\n# Expose the necessary port\nEXPOSE 8069\n\n# Command to start all necessary services when the container is run\nCMD service postgresql start \u0026\u0026 \\\n    service supervisor start \u0026\u0026 \\\n    supervisorctl start odoo17 \u0026\u0026 \\\n    tail -f /var/log/odoo17/odoo17.log\n\n```\n\n```\ndocker build -t odoo17-img-with-services .\n```\n\n```\ndocker run -d -p 8069:8069 --name odoo17-container odoo17-img-with-services\n```\n\n\n\n\n\u003cbr/\u003e\n\n---\n\n---\n\n\u003cbr/\u003e\n\n```\nCMD service postgresql start \u0026\u0026 \\\n    service supervisor start \u0026\u0026 \\\n    supervisorctl start odoo17 \u0026\u0026 \\\n    tail -f /var/log/odoo17/odoo17.log\n```\n\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n\nFiles inside container and thier paths :\n\n```\n/opt/odoo17\n/usr/bin/python3.10\n/etc/odoo17.conf\n/etc/supervisor/conf.d/odoo17.conf\n/var/log/odoo17\n```\n\n### odoo 17 config file (`/etc/supervisor/conf.d/odoo17.conf`) : \n\n```\nadmin_password = admin\ndb_user = odoo17\naddons_path = /opt/odoo17/addons\nlogfile = /var/log/odoo17/odoo17.log\n\n```\n\n\u003cbr/\u003e\n\n\n```\nsudo su - postgres\n```\n\n```\nsudo supervisorctl start odoo17\nsudo supervisorctl status\n```\n\n\u003cbr/\u003e \n\n\n### Enable Supervisor to Start at Boot\n\nTo make sure Supervisor starts automatically when the container starts, you should add the following to your Dockerfile or entrypoint script:\n```\nCMD [\"supervisord\", \"-n\"]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabt-tech-com%2Fdocker-odoo17","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmabt-tech-com%2Fdocker-odoo17","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabt-tech-com%2Fdocker-odoo17/lists"}