6 Commits

Author SHA1 Message Date
be890f1cb5 Merge pull request 'docs: align README and env examples with actual stack' (#5) from cursor/fix-readme-stack-accuracy into main
Reviewed-on: #5
2026-09-20 05:09:35 +00:00
b5c440a900 docs: align README and env examples with actual stack
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 08:30:31 +03:30
1285a1048e Merge git.faryad.top main into origin main 2026-09-19 14:00:29 +03:30
Diaco Soltanpour
76e0f803a3 Set Odoo login landing to Projects instead of Discuss
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary

Odoo 19 removed the **Home Action** field from user Preferences, so logins fall through to Discuss (`/odoo/discuss`). This PR adds a small addon that:

1. **Restores Home Action** on Settings → Users → Preferences and on My Preferences
2. **Defaults internal users** to `project.open_view_project_all` (Projects) on module install and when new internal users are created

## Apply

See **Odoo startup page (Projects instead of Discuss)** in [`README.md`](README.md): restart Odoo, Update Apps List, install **Project as Home Action** (`project_home_action`), then log out/in.

## Files

- [`odoo/addons/project_home_action/`](odoo/addons/project_home_action/) — new module (views + create override + post-init hook)
- [`README.md`](README.md) — install/apply steps

## Testing

- Validated Python/XML syntax and manifest structure
- Full Odoo runtime install was not available in this cloud agent environment (no running `odoo` container)
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a href="https://cursor.com/agents/bc-75c774b3-4d77-4418-b0e8-799ccb6c5c0b?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-75c774b3-4d77-4418-b0e8-799ccb6c5c0b&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>
2026-08-26 09:39:39 +00:00
Cursor Agent
19db9c58dd Document how to install project_home_action in README
Add Odoo startup-page steps under the existing Odoo section so
operators know how to enable Projects as the post-login landing.

Co-authored-by: dyaco8464 <dyaco8464@yahoo.com>
2026-08-26 09:38:28 +00:00
Cursor Agent
7776b7f10d Add project_home_action addon for Project login landing
Restores Home Action on user Preferences (removed in Odoo 19) and
defaults internal users to project.open_view_project_all on install
and create, so login opens Projects instead of Discuss.

Co-authored-by: dyaco8464 <dyaco8464@yahoo.com>
2026-08-26 09:28:48 +00:00
8 changed files with 228 additions and 67 deletions

View File

@@ -9,23 +9,26 @@ INSECURE=true
## Features ##
# The following variable is a convenience variable to enable or disable features of this compose project.
# Example: if you want to use traefik and letsencrypt, you can set the variable to
#COMPOSE_FILE=docker-compose.yml:traefik/opencloud.yml
# Root docker-compose.yml starts Traefik only; always include opencloud/opencloud.yml for OpenCloud.
# Example: baseline OpenCloud with Traefik
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml
# This enables you to just run `docker compose up -d` and the compose files will be added to the stack.
# As alternative approach you can run `docker compose -f docker-compose.yml -f docker-compose.traefik.yml up -d`
# Default: OpenCloud and Collabora with traefik and letsencypt
# As alternative approach you can run `docker compose -f docker-compose.yml -f opencloud/opencloud.yml up -d`
# OpenCloud and Collabora with Traefik and Let's Encrypt
# This needs DNS entries for the domain names used in the .env file.
#COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
# If you want to use the external proxy, you can use the following combination.
# DNS entries and certificates need to be managed by the external environment.
# The domain names need to be entered into the .env file.
#COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:external-proxy/opencloud.yml:external-proxy/collabora.yml
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:external-proxy/opencloud.yml:external-proxy/collabora.yml
# Keycloak Shared User Directory
#COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml:idm/ldap-keycloak.yml:traefik/ldap-keycloak.yml
# OpenCloud, Planka and Gitea
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:project/planka.yml:version-control/gitea.yml:traefik/opencloud.yml:traefik/planka.yml:database/postgres.yml:traefik/gitea.yml
# Odoo, Gitea, opencloud
#Compose_File=docker-compose.yml:odoo/odoo.yml:opencloud/opencloud.yml:version-control/gitea.yml:traefik/opencloud.yml:traefik/planka.yml:database/postgres.yml:traefik/gitea.yml:traefik/odoo.yml
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml:idm/ldap-keycloak.yml:traefik/ldap-keycloak.yml
# OpenCloud and Gitea (shared Postgres)
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:version-control/gitea.yml:database/postgres.yml
# Odoo, Gitea, and OpenCloud (shared Postgres; include odoo-init on first start)
#COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:odoo/odoo.yml:odoo/odoo-init.yml:version-control/gitea.yml:database/postgres.yml
# Odoo, Gitea, OpenCloud, Postgres, with backup and restore helpers
#COMPOSE_FILE=docker-compose.yml:odoo/odoo.yml:opencloud/opencloud.yml:version-control/gitea.yml:database/postgres.yml:backup/backup.yml:odoo/odoo-init.yml:backup/restore.yml
## Traefik Settings ##
# Note: Traefik is always enabled and can't be disabled.

179
README.md
View File

@@ -1,10 +1,12 @@
# OpenCloud Compose
# Selfhost Cloud Compose Stack
This repository provides Docker Compose configurations for deploying OpenCloud in various environments.
This repository provides modular Docker Compose configurations for a self-hosted stack built around OpenCloud, with Traefik at the root and optional Odoo, Gitea, Postgres, and backup services.
## Overview
OpenCloud Compose offers a modular approach to deploying OpenCloud with several configuration options:
The stack uses a modular compose layout. The root `docker-compose.yml` starts **Traefik only**. OpenCloud and other apps are added as overlay files.
OpenCloud options:
- **Standard deployment** with Traefik reverse proxy and Let's Encrypt certificates or certificates from files
- **External proxy** support for environments with existing reverse proxies (like Nginx, Caddy, etc.)
@@ -14,6 +16,15 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several
- **Monitoring** with metrics endpoints for observability and performance monitoring
- **Radicale** integration for Calendar and Contacts
Additional services in this repo:
- **Odoo 19** (`odoo/odoo.yml` + `odoo/odoo-init.yml`)
- **Gitea** (`version-control/gitea.yml`, SSH on port 2222) — see [version-control/README.md](version-control/README.md)
- **Shared Postgres** (`database/postgres.yml`) for Gitea and Odoo
- **Backups** (`backup/backup.yml`, `backup/restore.yml`, optional Borgmatic) — see [backup/README.md](backup/README.md) and [backup/borgmatic-README.md](backup/borgmatic-README.md)
> **Note**: Traefik is always present via `docker-compose.yml`. OpenCloud lives in `opencloud/opencloud.yml` (with Traefik labels). Overlays that attach services to `opencloud-net` (Collabora, Keycloak, Tika, Radicale, monitoring) typically also include `traefik/opencloud.yml` so Traefik joins that network.
## Quick Start Guide
### Prerequisites
@@ -29,8 +40,8 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several
1. **Clone the repository**:
```bash
git clone https://github.com/opencloud-eu/opencloud-compose.git
cd opencloud-compose
git clone ssh://git@git.faryad.top:2222/rhino/selfhost-cloud-compose-stack.git
cd selfhost-cloud-compose-stack
```
2. **Create environment file**:
@@ -48,12 +59,12 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several
You can deploy using explicit `-f` flags:
```bash
docker compose -f docker-compose.yml -f traefik/opencloud.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml up -d
```
Or by adding the `COMPOSE_FILE` variable in `.env`:
```
COMPOSE_FILE=docker-compose.yml:traefik/opencloud.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml
```
Then simply run:
@@ -66,6 +77,8 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several
127.0.0.1 cloud.opencloud.test
127.0.0.1 traefik.opencloud.test
127.0.0.1 keycloak.opencloud.test
127.0.0.1 git.opencloud.test
127.0.0.1 odoo.opencloud.test
```
7. **Access OpenCloud**:
@@ -85,10 +98,10 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several
2. **Configure deployment options** in `.env`:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
```
3. **Start OpenCloud**:
3. **Start the stack**:
```bash
docker compose up -d
```
@@ -103,12 +116,12 @@ OpenCloud can be deployed with Keycloak for identity management and LDAP for the
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f idm/ldap-keycloak.yml -f traefik/opencloud.yml -f traefik/ldap-keycloak.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f idm/ldap-keycloak.yml -f traefik/opencloud.yml -f traefik/ldap-keycloak.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/ldap-keycloak.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/ldap-keycloak.yml
```
> **For local development only**: Add to `/etc/hosts`:
@@ -129,12 +142,12 @@ Include Collabora for document editing using either method:
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f weboffice/collabora.yml -f traefik/opencloud.yml -f traefik/collabora.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f weboffice/collabora.yml -f traefik/opencloud.yml -f traefik/collabora.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
```
> **For local development only**: Add to `/etc/hosts`:
@@ -151,12 +164,12 @@ Enable full text search capabilities with Apache Tika using either method:
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f search/tika.yml -f traefik/opencloud.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f search/tika.yml -f traefik/opencloud.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:search/tika.yml:traefik/opencloud.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:search/tika.yml:traefik/opencloud.yml
```
This setup includes:
@@ -172,12 +185,12 @@ Enable CalDAV (calendars, to-do lists) and CardDAV (contacts) server.
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f radicale/radicale.yml -f traefik/opencloud.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f radicale/radicale.yml -f traefik/opencloud.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:radicale/radicale.yml:traefik/opencloud.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:radicale/radicale.yml:traefik/opencloud.yml
```
This setup includes:
@@ -190,25 +203,27 @@ Enable monitoring capabilities with metrics endpoints using either method:
> **DNS Requirements**: This setup requires DNS entries for the main OpenCloud domain. Configure a DNS A/AAAA record for your domain (e.g., `cloud.example.com`) or use a wildcard DNS entry (`*.example.com`).
Using `-f` flags:
OpenCloud proxy metrics (`monitoring/monitoring.yml`):
```bash
docker compose -f docker-compose.yml -f monitoring/monitoring.yml -f traefik/opencloud.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f monitoring/monitoring.yml -f traefik/opencloud.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:monitoring/monitoring.yml:traefik/opencloud.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:monitoring/monitoring.yml:traefik/opencloud.yml
```
For Collabora collaboration-service metrics, also include `monitoring/monitoring-collaboration.yml` (requires the Collabora overlay):
```
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:monitoring/monitoring.yml:monitoring/monitoring-collaboration.yml:traefik/opencloud.yml:traefik/collabora.yml
```
This setup includes:
- Metrics endpoints for OpenCloud proxy service (port 9205)
- Metrics endpoints for collaboration service (port 9304)
- Performance monitoring and observability data
- Metrics endpoint for the OpenCloud proxy service (listens on port 9205 inside the container)
- Metrics endpoint for the collaboration service (listens on port 9304 inside the container; needs `monitoring/monitoring-collaboration.yml`)
- Prometheus-compatible metrics format
Access metrics endpoints:
- OpenCloud metrics: `http://localhost:9205/metrics`
- Collaboration metrics: `http://localhost:9304/metrics`
> **Note**: These overlays set listen addresses only; they do **not** publish host ports. Scrape metrics from the Docker network (for example `http://opencloud:9205/metrics` or `http://collaboration:9304/metrics`), or add your own port mappings if you need host access.
> **Note**: The monitoring configuration uses an external network `opencloud-net`. You need to create this network manually before starting the services:
> ```bash
@@ -223,12 +238,12 @@ If you already have a reverse proxy (Nginx, Caddy, etc.), use either method:
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f weboffice/collabora.yml -f external-proxy/opencloud.yml -f external-proxy/collabora.yml up -d
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f weboffice/collabora.yml -f external-proxy/opencloud.yml -f external-proxy/collabora.yml up -d
```
Or by setting in `.env`:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:external-proxy/opencloud.yml:external-proxy/collabora.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:external-proxy/opencloud.yml:external-proxy/collabora.yml
```
This exposes the necessary ports:
@@ -240,10 +255,38 @@ This exposes the necessary ports:
If you're using **Nginx Proxy Manager (NPM)**, you **should NOT** activate **"Block Common Exploits"** for the Proxy Host.
Otherwise, the desktop app authentication will return **error 403 Forbidden**.
### With Odoo, Gitea, and Shared Postgres
Odoo and Gitea share Postgres from `database/postgres.yml`. Traefik labels for Odoo are already in `odoo/odoo.yml` (there is no `traefik/odoo.yml`).
Example:
```
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:odoo/odoo.yml:odoo/odoo-init.yml:database/postgres.yml:version-control/gitea.yml
```
Using `-f` flags:
```bash
docker compose -f docker-compose.yml -f opencloud/opencloud.yml -f odoo/odoo.yml -f odoo/odoo-init.yml -f database/postgres.yml -f version-control/gitea.yml up -d
```
> **For local development only**: Add to `/etc/hosts`:
> ```
> 127.0.0.1 odoo.opencloud.test
> 127.0.0.1 git.opencloud.test
> ```
- **Odoo**: include `odoo/odoo-init.yml` on first start so volume ownership is fixed automatically — see [scripts/odoo/README.md](scripts/odoo/README.md)
- **Gitea**: web UI via Traefik; SSH on host port **2222** — see [version-control/README.md](version-control/README.md)
### Backups
Scheduled Postgres dumps and volume archives are defined in `backup/backup.yml`; restores use `backup/restore.yml`. Optional Borgmatic is in `backup/borgmatic.yml`.
See [backup/README.md](backup/README.md) and [backup/borgmatic-README.md](backup/borgmatic-README.md) for configuration and restore workflows. Do not copy outdated volume names from older docs; Odoo uses `odoo-db-data` and `odoo-config` (see below).
## SSL Certificate Support
OpenCloud Compose supports adding SSL certificates for public domains and development environments. This feature enables you to use the "Let's Encrypt ACME challenge" to generate certificates for your public domains as well as using your own certificates.
This stack supports adding SSL certificates for public domains and development environments. This feature enables you to use the "Let's Encrypt ACME challenge" to generate certificates for your public domains as well as using your own certificates.
### Use Let's Encrypt with ACME Challenge
@@ -408,34 +451,54 @@ mkdir -p /path/to/opencloud/{config,data}
chown -R 1000:1000 /path/to/opencloud
```
#### Odoo Volume Permissions (First-Time Setup)
#### Odoo volumes and first-time init
When deploying Odoo for the first time, the named volumes are created with root ownership by default. To allow Odoo to write to its filestore and other directories, fix the ownership before starting the services:
Odoo uses:
- named volume `odoo-db-data` → `/var/lib/odoo` (filestore, sessions, attachments)
- named volume `odoo-config` → `/etc/odoo`
- bind mount `./odoo/addons` → `/mnt/extra-addons`
On first deploy, include `odoo/odoo-init.yml`. The one-shot `odoo-init` service chowns the named volumes and initializes the database. Details: [scripts/odoo/README.md](scripts/odoo/README.md).
#### Odoo startup page (Projects instead of Discuss)
By default, Odoo 19 opens **Discuss** after login. The custom addon [`odoo/addons/project_home_action`](odoo/addons/project_home_action) restores the **Home Action** field on user Preferences and sets it to **Projects** for internal users.
`./odoo/addons` is already mounted into the container at `/mnt/extra-addons` via [`odoo/odoo.yml`](odoo/odoo.yml). After deploying a revision that includes this addon:
1. Restart Odoo if the container was already running, so it picks up the new module files:
```bash
# Detect Odoo UID:GID and fix volume ownership
OG=$(docker run --rm odoo:19 sh -c "printf \"%s:%s\" \"\$(id -u odoo)\" \"\$(id -g odoo)\"")
for v in odoo-filestore odoo-db-data odoo-config odoo-logs odoo-web-data odoo-addons; do
docker run --rm -v "${v}:/data" alpine chown -R "$OG" /data
done
docker compose restart odoo
```
2. In Odoo, open **Settings → Apps**.
3. Remove the **Apps** filter (and enable **developer mode** if the Apps menu is limited), then **Update Apps List**.
4. Search for **Project as Home Action** (`project_home_action`) and **Install** it.
5. Log out and log back in. You should land on Projects (`/odoo/project`) instead of Discuss.
This ensures Odoo can create attachments, logs, and configuration files without permission errors.
On install, existing internal users with an empty Home Action are updated automatically. New internal users get the same default. You can still change Home Action per user under **Settings → Users → Preferences** (or **My Preferences**).
Requires the **Project** app to be installed (`depends: project`).
### Compose File Structure
This repository uses a modular approach with multiple compose files:
- `docker-compose.yml` - Core OpenCloud service
- `weboffice/` - Web office integrations (Collabora Online)
- `storage/` - Storage backend configurations (decomposeds3)
- `search/` - Search and content analysis services (Apache Tika)
- `monitoring/` - Monitoring and metrics configurations
- `idm/` - Identity management configurations (Keycloak & LDAP)
- `traefik/` - Traefik reverse proxy configurations
- `external-proxy/` - Configuration for external reverse proxies
- `radicale/` - Radicale configuration
- `config/` - Configuration files for OpenCloud, Keycloak, and LDAP
- `docker-compose.yml` — Traefik reverse proxy (always included)
- `opencloud/` — OpenCloud service
- `odoo/` — Odoo 19 and first-boot init
- `version-control/` — Gitea
- `database/` — Shared Postgres for Gitea and Odoo
- `backup/` — Backup, restore, and optional Borgmatic helpers
- `weboffice/` — Web office integrations (Collabora Online)
- `storage/` — Storage backend configurations (decomposeds3)
- `search/` — Search and content analysis services (Apache Tika)
- `monitoring/` — Monitoring and metrics configurations
- `idm/` — Identity management configurations (Keycloak & LDAP)
- `traefik/` — Extra Traefik network aliases and labels for overlays
- `external-proxy/` — Configuration for external reverse proxies
- `radicale/` — Radicale configuration
- `config/` — Configuration files for OpenCloud, Keycloak, LDAP, Traefik, etc.
## Advanced Usage
@@ -450,24 +513,34 @@ The `COMPOSE_FILE` environment variable is a powerful way to manage complex Dock
Example configurations:
Baseline OpenCloud:
```
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml
```
Production with Collabora:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
```
Production with Keycloak and LDAP:
```
COMPOSE_FILE=docker-compose.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/ldap-keycloak.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/ldap-keycloak.yml
```
Production with both Collabora and Keycloak/LDAP:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/collabora.yml:traefik/ldap-keycloak.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:idm/ldap-keycloak.yml:traefik/opencloud.yml:traefik/collabora.yml:traefik/ldap-keycloak.yml
```
Production with monitoring:
```
COMPOSE_FILE=docker-compose.yml:monitoring/monitoring.yml:traefik/opencloud.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:monitoring/monitoring.yml:traefik/opencloud.yml
```
OpenCloud with Odoo, Gitea, and Postgres:
```
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:odoo/odoo.yml:odoo/odoo-init.yml:database/postgres.yml:version-control/gitea.yml
```
### Automation and GitOps
@@ -475,7 +548,7 @@ COMPOSE_FILE=docker-compose.yml:monitoring/monitoring.yml:traefik/opencloud.yml
For automated deployments, using the `COMPOSE_FILE` variable in `.env` is recommended:
```
COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
COMPOSE_FILE=docker-compose.yml:opencloud/opencloud.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml
```
This allows tools like Ansible or CI/CD pipelines to deploy the stack without modifying the compose files.
@@ -509,7 +582,7 @@ services:
- **SSL Certificate Errors**: For local development, accept self-signed certificates by visiting each domain directly in your browser.
- **Port Conflicts**: If you have services already using ports 80/443, use the external proxy configuration.
- **Permission Issues**: Ensure data and config directories have proper permissions (owned by user/group 1000).
- **Permission Issues**: Ensure data and config directories have proper permissions (owned by user/group 1000). For Odoo named volumes, use `odoo/odoo-init.yml` on first start.
### Logs

View File

@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook

View File

@@ -0,0 +1,19 @@
{
"name": "Project as Home Action",
"version": "1.0.0",
"summary": "Open Projects after login instead of Discuss",
"description": (
"Restores the Home Action field on user Preferences (removed in Odoo 19) "
"and sets it to Projects for internal users on install and for new users."
),
"category": "Project",
"author": "Automated",
"license": "LGPL-3",
"depends": ["base", "project", "web"],
"data": [
"views/res_users_views.xml",
],
"post_init_hook": "post_init_hook",
"installable": True,
"application": False,
}

View File

@@ -0,0 +1,13 @@
def post_init_hook(env):
"""Set Home Action to Projects for internal users that have none."""
action = env.ref("project.open_view_project_all", raise_if_not_found=False)
if not action:
return
users = env["res.users"].search(
[
("share", "=", False),
("action_id", "=", False),
]
)
if users:
users.write({"action_id": action.id})

View File

@@ -0,0 +1 @@
from . import res_users

View File

@@ -0,0 +1,20 @@
from odoo import api, models
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def _project_home_action(self):
return self.env.ref("project.open_view_project_all", raise_if_not_found=False)
@api.model_create_multi
def create(self, vals_list):
users = super().create(vals_list)
action = self._project_home_action()
if not action:
return users
to_update = users.filtered(lambda user: not user.share and not user.action_id)
if to_update:
to_update.write({"action_id": action.id})
return users

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Admin user form: Preferences → Home Action -->
<record id="view_users_form_home_action" model="ir.ui.view">
<field name="name">res.users.form.home.action</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='preferences']//group[@name='other_preferences']" position="inside">
<group string="Menus Customization" invisible="share">
<field name="action_id" options="{'no_create': True}"/>
</group>
</xpath>
</field>
</record>
<!-- My Preferences dialog -->
<record id="view_users_form_simple_modif_home_action" model="ir.ui.view">
<field name="name">res.users.preferences.form.home.action</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='preferences_page']//group[@name='other_preferences']" position="inside">
<group string="Menus Customization">
<field name="action_id" options="{'no_create': True}" readonly="0"/>
</group>
</xpath>
</field>
</record>
</odoo>