feat: refactor Docker Compose setup and revert Python packaging changes

This commit is contained in:
Janik von Rotz committed 2026-09-08 14:38:58 +02:00
1 parent 01b1f58ac2
commit 4db96f221f
12 files changed
+120 -7216

No files matched your search

-1
View File
@@ -8,7 +8,6 @@ node_modules
.temp
.cache
dist
pnpm-workspace.yaml
# File management
+22 -1
View File
@@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## Unreleased
### Changed
- Replaced `pgadmin4` container with `mailgate` in Docker Compose setup.
- Removed `pgadmin4` service and related configuration from `compose.yml.template`.
- Removed `servers.json` configuration file.
- Reverted `requirements.txt` changes: Removed `pyproject.toml`, restored root `requirements.txt`, and reverted `install` command to use `uv pip install -r requirements.txt`.
- Updated `task` command `start` to remove `admin`, `hatch`, and `jupyter` options.
- Updated `task` command `remove` to remove `admin` option.
- Updated `install-vuepress` to use `pnpm runtime set node lts -g` instead of `pnpm env use --global lts`.
- Removed `package-lock.json`.
- Added `pnpm-workspace.yaml`.
### Removed
- Removed `admin` service from Docker Compose setup.
- Removed `hatch` and `jupyter` start options from `task` command.
- Removed `servers.json`.
- Removed `pyproject.toml`.
- Removed `package-lock.json`.
## Undefined
### Fixed
@@ -97,7 +119,6 @@ All notable changes to this project will be documented in this file. The format
- Removed `ls-modules` and updated `list-modules`.
- Make task script grep `-P` free.
## 2025-08-22
### Added
+3 -5
View File
@@ -8,7 +8,7 @@ This is the [Mint System](https://www.mint-system.ch/) Odoo development environm
This projects provides a highly opinionated way to manage and develop Odoo. It features:
- 🔍 **Odoo Source**: Checkout the Odoo Community and Enterprise Edition and start editing the source code.
- 🐳 **Container Compose**: Spin up an Odoo, Postgres, and pgAdmin container and experiment locally.
- 🐳 **Container Compose**: Spin up an Odoo, Postgres, and Mailgate container and experiment locally.
- 💻 **Native**: Start an Odoo server directly from the source.
- 🔄 **Multiple Versions**: With Odoo Build, you can switch between Odoo versions starting from 13.0 up to 19.0.
- 🛠️ **Develop Modules**: Generate new modules, develop new Odoo features locally.
@@ -17,9 +17,7 @@ This projects provides a highly opinionated way to manage and develop Odoo. It f
- ✂️ **Customizing Snippets**: Create [snippets](./snippets.md) and push them to an Odoo database.
- 🕰️ **Odoo Revisions**: Snapshot the Odoo source at a specific date. See [revisions](./revisions.md) for details.
- 📦 **Container Image**: Build and publish custom Odoo images. See [README](./images/README.md) for details.
- 🔑 **Credentials**: Manage login credentials for Odoo and other applications.
- ⬆️ **Odoo Upgrade**: Helper commands to ease the Odoo [upgrade](./upgrade.md) process.
- 🚀 **And More**: See [task help](./task.md).
- 📓 **Jupyter Notebooks**: Initialize and run Jupyter Lab integrated with Odoo, and execute notebooks with Papermill.
## Requirements
@@ -35,7 +33,7 @@ bash/zsh `alias task='./task'` with [completion](https://taskfile.build/usage/#c
## Usage
The usage section is a set of workflows. See `task help` or [task](./task.md) for details about the project commands.
The usage section is a set of workflows. See `task help` for details about the project commands.
Clone this repository.
-16
View File
@@ -86,21 +86,6 @@ services:
${VOLUME_MOUNTS}
networks:
- default
admin:
container_name: admin
image: docker.io/dpage/pgadmin4:6
depends_on:
- db
ports:
- "8000:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
- admin-data:/var/lib/pgadmin
- ./servers.json:/pgadmin4/servers.json
networks:
- default
db:
container_name: db
image: ${POSTGRES_IMAGE}
@@ -155,7 +140,6 @@ ${VOLUME_MOUNTS}
volumes:
odoo-data:
db-data:
admin-data:
mail-data:
networks:
default:
-7102
View File
File diff suppressed because it is too large. Load diff
+3
View File
@@ -0,0 +1,3 @@
allowBuilds:
'@parcel/watcher': true
esbuild: true
@@ -1,6 +1,6 @@
---
title: "Replace requirements.txt with pyproject.toml"
state: draft
state: cancelled
model:
input_tokens:
---
@@ -31,6 +31,8 @@ Do not make this change for `odoo/requirements.txt`
## Worklog
@Clanker Add a summary here once the task has been completed.
@Clanker Set frontmatter state to completed and update info about model and token usage.
- Reverted the change. The `.python-version` file is dynamic (changes per checked-out Odoo version), making `requires-python` in `pyproject.toml` impractical.
- Recreated the root `requirements.txt` with all project dependencies.
- Removed `pyproject.toml`.
- Reverted the `install` command in `task` back to `uv pip install -r requirements.txt`.
- Left `odoo/requirements.txt` and image-level `requirements.txt` references untouched.
@@ -0,0 +1,83 @@
---
title: "Show optional and required params in task help"
state: draft
model:
input_tokens:
---
# Run 32
Note: @Clanker refers to the "ai agent" (you) who is working on this task.
@Clanker when working on this task, make sure to:
- Read context and task section first
- Prepare a list of todos
- Update the todo list while working on the task
## Context
@Clanker Read the `AGENTS.md` and `README.md` to get an understanding of the project.
## Task
Currently the parameters of commands defined the `task` file are shown as optional:
```bash
[main][~/Odoo-Build]$ task help start-odoo-jupyter
start-odoo-jupyter [path][db] Start juypter lab in directory.
```
In this case the correct definition is:
```
[main][~/Odoo-Build]$ task help start-odoo-jupyter
start-odoo-jupyter <path>[db] Start juypter lab in directory.
```
Because according to the function the path is requied and db params is optional:
```bash
start-odoo-jupyter() {
if [[ -z "$1" ]]; then
echo '$1/path is empty.'
exit
fi
local database="$2"
if [[ -z "$database" ]]; then
database="$DB_NAME"
fi
```
For every command check the if the functions expect the param as required or optional.
While checking the functions also add the var name to empty check. This
```bash
record-with-py-spy() {
if [[ -z "$1" ]]; then
echo '$1 is empty.'
exit
fi
```
Must become:
```bash
record-with-py-spy() {
if [[ -z "$1" ]]; then
echo '$1/pid is empty.'
exit
fi
```
The name of the var can be derived from the help rows.
## Worklog
@Clanker Add a summary here once the task has been completed.
@Clanker Set frontmatter state to completed and update info about model and token usage.
-36
View File
@@ -1,36 +0,0 @@
[project]
name = "odoo-build"
version = "0.1.0"
description = "This is the Mint System Odoo development environment."
readme = "README.md"
dependencies = [
# Container
"podman-compose",
# Testing
"pre-commit",
"pyyaml",
"coverage",
"pylint-odoo",
"pytest-odoo",
# Setup
"setuptools",
"wheel",
"watchdog",
"pdfminer.six",
"debugpy",
# Performance
"py-spy",
"memray",
# Upgrade
"openupgradelib @ git+https://github.com/OCA/openupgradelib.git@master",
"odoo-upgrade @ git+https://github.com/odoo/upgrade-util@master ; python_version <= '3.12'",
# OCA Tools
"manifestoo",
"oca-port",
"odoo-module-migrator",
"click-odoo-contrib",
"git-aggregator",
"oca-maintainers-tools @ git+https://github.com/OCA/maintainer-tools",
"hatch-odoo",
"copier",
]
+1 -1
View File
@@ -45,4 +45,4 @@ rl-renderPM
# Jupyter Notebook
jupyter
papermill
papermill
-20
View File
@@ -1,20 +0,0 @@
{
"Servers": {
"1": {
"Name": "localhost",
"Group": "Servers",
"Host": "db",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "odoo",
"SSLMode": "prefer",
"SSLCert": "<STORAGE_DIR>/.postgresql/postgresql.crt",
"SSLKey": "<STORAGE_DIR>/.postgresql/postgresql.key",
"SSLCompression": 0,
"Timeout": 10,
"UseSSHTunnel": 0,
"TunnelPort": "22",
"TunnelAuthentication": 0
}
}
}
+2 -30
View File
@@ -1226,20 +1226,12 @@ start() {
if [[ "$1" = "list" ]]; then
echo "Options:"
echo "admin"
echo "db"
echo "mailgate"
echo "mailpit"
echo "source"
echo "hatch"
echo "odoo"
echo "odoo-nginx"
echo "jupyter"
fi
if [[ "$1" =~ "admin" ]]; then
echo 'Open http://localhost:8000 url in your browser.'
open-url-with-delay "http://localhost:8000" 2 & $COMPOSE_COMMAND up -d admin
echo "source"
fi
if [[ "$1" =~ "db" ]]; then
@@ -1272,22 +1264,6 @@ start() {
--http-port="$port" --addons-path="$ADDONS_PATH" --dev=all --log-level="$LOG_LEVEL"
fi
if [[ "$1" =~ "hatch" ]]; then
template-odoo-rc
local port=8069
while [[ $port -le 8079 ]]; do
if ! lsof -i:$port >/dev/null 2>&1; then
break
fi
port=$((port + 1))
done
echo "Open http://localhost:$port url in your browser."
open-url-with-delay "http://localhost:$port/web?debug=1&db=$database" 2 &
odoo --database="$database" --config="$ODOO_RC" \
--http-port="$port" --dev=all --log-level="$LOG_LEVEL"
fi
if [[ "$1" =~ "odoo" ]]; then
echo "Start Odoo container ${CONTAINER_REGISTRY}/${CONTAINER_TAG}"
echo 'Open http://localhost:8069 url in your browser.'
@@ -1445,10 +1421,6 @@ remove() {
$COMPOSE_COMMAND rm -f -s -v db
fi
if [[ "$1" =~ "admin" ]]; then
$COMPOSE_COMMAND rm -f -s -v admin
fi
if [[ "$1" =~ "odoo" ]]; then
$COMPOSE_COMMAND rm -f -s -v odoo
fi
@@ -3084,7 +3056,7 @@ import-website-data() {
install-vuepress() {
echo 'Install Node.'
pnpm env use --global lts
pnpm runtime set node lts -g
echo 'Install npm packages.'
pnpm install