Tag Archive for: local

Deploying Odoo Community Locally with Docker Compose

In this post we’ll spin up Odoo Community Edition on your local network using Docker Compose, so that any machine on your LAN can connect to it.

1. Create your docker-compose.yml

version: '3.8'
services:
  odoo:
    image: odoo:18
    container_name: odoo
    depends_on:
      - db
    ports:
      - "0.0.0.0:8069:8069"    # Expose Odoo on host port 8069
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    volumes:
      - odoo-data:/var/lib/odoo
    restart: always

  db:
    image: postgres:16
    container_name: db
    environment:
      POSTGRES_DB: odoo
      POSTGRES_USER: odoo
      POSTGRES_PASSWORD: odoo
    volumes:
      - odoo-db-data:/var/lib/postgresql/data
    restart: always

volumes:
  odoo-data:
  odoo-db-data:

2. Launch the services

docker compose up -d

3. Verify it’s running

curl -I http://localhost:8069
# You should see "HTTP/1.1 303 SEE OTHER" redirecting to /odoo

Open your browser on any LAN machine:
➡️ http://192.168.121.145:8069

Simple local development environment for web apps

  1. Open your app working directory
    • There you should have at least index.html
  2. Launch http-server in your terminal
    • If you haven’t installed it yet: npm install http-server -g
  3. Launch chromium-browser --disable-web-security --user-data-dir=/tmp/something in your terminal to allow all origins (temporary ignore  CORS mechanism )
    • Make sure you don’t have other instances open: pkill -f chromium
  4. Type in the address bar one of the address from your http-server info to access to your app

Note: Use Chromium without security just with your own code for testing and development, do not browse with it and beware about using third-party software in your code.