services:
  app:
    # image: odoo:19
    build:
      context: .
      dockerfile: Dockerfile
    restart: unless-stopped
    environment:
      - HOST=${DB_HOST}
      - PORT=${DB_PORT}
      - USER=${DB_USER}
      - PASSWORD=${DB_PASSWORD}
      - DATABASE=${DB_NAME}
    volumes:
      - odoo-data:/var/lib/odoo
      - ./modules:/mnt/extra-addons
    networks:
      - dokploy-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.odoo-his.rule=Host(`odoo.mhiwelding.ca`)"
      - "traefik.http.routers.odoo-his.entrypoints=websecure"
      - "traefik.http.routers.odoo-his.tls.certresolver=letsencrypt"
      - "traefik.http.services.odoo-his.loadbalancer.server.port=8069"

volumes:
  odoo-data:

networks:
  dokploy-network:
    external: true
