Hello everyone, it’s ,me Osama from the future
.And I found the solution.
If you ever ran into this problem, you might find the answer here.
Issue Description: When deploying the Bahmni Standard distribution using Docker on Linux, users may encounter an “Internal Server Error” when attempting to access the Inventory & Billing module. Upon checking the container logs (docker compose logs odoo), the system shows a PermissionError related to the filestore directory.
Root Cause: This issue occurs because the Docker volumes for Odoo are created with root ownership by default. However, the Odoo service runs as a non-root user (UID 101) inside the container. Consequently, the service lacks the necessary write permissions to the filestore, config, and appdata directories, causing the initialization process to fail.
Solution: To resolve this, you need to adjust the ownership of the Odoo volumes to match the internal user (UID 101). Follow the steps below:
Step 1: Stop the running containers Navigate to your project directory (bahmni-docker/bahmni-standard) and stop all services:
bash: docker compose down
Step 2: Fix ownership permissions Run the following command to launch a temporary helper container. This will recursively change the ownership of the Odoo directories to UID 101:
bash: docker run --rm -v bahmni-standard_odoofilestore:/data -v bahmni-standard_odooconfig:/config -v bahmni-standard_odooappdata:/app alpine sh -c “chown -R 101:101 /data /config /app && chmod -R 775 /data /config /app”
Step 3: Restart the system Bring the services back up with the standard profile:
bash: docker compose --profile bahmni-standard up -d
docker compose --profile bahmni-standard up -d
Outcome: Wait approximately 2-3 minutes for the database to initialize fully. The Inventory & Billing module should now be accessible without errors.