My name is Sajid Khan, a Top Rated Fiverr professional and Backend & DevOps Engineer with over 8 years of experience in building scalable, containerized applications. I specialize in C#, Java, Python, PHP, ASP.NET Core, Laravel, React, Docker, Kubernetes, virtualization, Ansible, Heroku, Railway, Render, Vercel, Netlify, AWS, GCP, Azure, and more. As a Certified Google Cloud, AWS, Azure, and Agile Professional, I excel at designing, developing, and deploying robust architectures that ensure seamless performance and reliability. I've successfully integrated document editing solutions like OnlyOffice into Nextcloud environments for multiple clients, optimizing for Docker Compose stacks and environment-driven configurations.
After reviewing your repository and the requirements outlined in Issue #9, I fully understand your goal: to enhance your local "slim" Nextcloud Murena Workspace with OnlyOffice integration. This will enable default document editing capabilities (DOCX, XLSX, PPTX) via a pre-installed app, env-var configuration, shared PostgreSQL DB patching, service addition, and sample files—all while maintaining your env-only config philosophy and ensuring HTTP/HTTPS compatibility. I'm excited to deliver a turnkey solution that passes all your specified tests, with clean commits to your slim branch for easy review and merge. Below, I'll outline the full scope, timeline, and pricing.
Your project requires extending the existing Docker-based Nextcloud setup (using slim.Dockerfile for multi-stage FPM/Nginx builds, docker-compose.local.yml for local services, and env-driven configs like pgsql_ssl.config.php) to include OnlyOffice Document Server. Key focuses:
Env-Only Management: All configurations via ONLYOFFICE_ prefixed environment variables (loaded dynamically, similar to your PostgreSQL SSL config).
Local Stack Integrity: No disruptions to existing services (DB, Redis, Syslog, Nextcloud, Nginx); reuse shared PostgreSQL for OnlyOffice DB.
Auto-Setup: App installs/enables by default on fresh builds; no manual admin intervention for users.
Testing: Comprehensive validation per your tests, including README compatibility and seamless edit/save flows.
-
Install Nextcloud OnlyOffice App by Default
- Download and integrate the latest OnlyOffice app (v9.11.0 as of Oct 2025) into
slim.Dockerfileusing your existing curl/tar pattern (ARG for URL, place in/apps/onlyofficefor occ enablement). - Ensure it pre-installs during image build, auto-enables via hooks post-init.
- Download and integrate the latest OnlyOffice app (v9.11.0 as of Oct 2025) into
-
Configure OnlyOffice on Nextcloud with
ONLYOFFICE_Environment Variables- Add support for prefixed env vars (e.g.,
ONLYOFFICE_DOCUMENT_SERVER_URL,ONLYOFFICE_JWT_SECRET) in a new hook script (hooks.d/99-onlyoffice-setup.sh). - Use
php occ config:app:setto apply settings dynamically (with defaults), mirroringgetenv()style inconfig/nextcloud/pgsql_ssl.config.php. - Update
.env.examplewith new vars; ensure overrides work without hardcoding.
- Add support for prefixed env vars (e.g.,
-
Patch PostgreSQL Container Init to Create OnlyOffice DB
- Add an idempotent init script (
config/postgres/init-onlyoffice.sql) mounted to/docker-entrypoint-initdb.d/indocker-compose.local.yml. - Creates
onlyofficeDB/user with env-password fallback (e.g.,${ONLYOFFICE_DB_PASSWORD}), following Postgres Docker Hub initialization scripts. - Reuses your existing
dbservice (Postgres 16.10-alpine) for shared access.
- Add an idempotent init script (
-
Add OnlyOffice Services to
docker-compose.local.yml- Introduce
documentserverservice usingonlyoffice/documentserver:latestimage. - Configure with shared DB (internal
dbhostname), JWT from env, volumes for data/logs, and port 8081:80. - Integrate into
worker-network; add healthcheck/depends_on for reliability. - Example alignment: Based on official OnlyOffice Docker Compose, but slimmed for your stack.
- Introduce
-
Add 3 Default Relevant Samples (DOC, XLS, PPT)
- Create
samples/office-samples/dir in repo with blank files:welcome.docx(simple text),sheet.xlsx(basic table),presentation.pptx(single slide). - Copy to skeleton in
slim.Dockerfile(around L28 style:COPY ... /core/skeleton/files_samples/), chown to www-data. - Auto-appear in Nextcloud Files app post-install for immediate testing.
- Create
To ensure quality, I'll validate against your exact criteria:
-
Local Instance via README: Run docker
compose up -d --buildper README; confirm full stack starts (http://localhost:8000 accessible, no errors). -
Load Documents Post-Fresh Install: Samples load in OnlyOffice viewer/editor without admin action in slim Murena Workspace.
-
Edit & Save Documents: Full round-trip: Edit .docx/.xlsx/.pptx in OnlyOffice, save, and verify sync back to Nextcloud Files.
-
Env Var Overrides: Set custom
ONLYOFFICE_in.env; restart confirms app uses env values (not defaults), validated via Settings > OnlyOffice. -
Main Docker Compose Minimalism: Only add new
ONLYOFFICE_*envs to your productiondocker-compose.yml(no services/DB—assume external OnlyOffice). -
HTTP/HTTPS Reachability: Local: HTTP on port 8081; staging/prod: HTTPS via env URL (e.g.,
https://documentserver:443), with app validation.
- Phase 1: Planning & Setup (Day 1): Audit repo/files, update
.env.example, implement Task 1 (app install) and Task 5 (samples) inslim.Dockerfile. - Phase 2: Core Integration (Days 2-3): Handle Tasks 2-4 (config script, DB patch, services); add volumes/networks to compose; implement hook for occ setup.
- Phase 3: Testing & Refinement (Days 4-5): Run all 6 tests; fix any issues; update README.md with OnlyOffice section; push commits to a feature branch for your review/merge.
- Deliverables:
- Updated
slim.Dockerfile,docker-compose.local.yml, newconfigs/scripts/samples. - Tested
.env.examplewith OnlyOffice vars. - README updates and test verification logs/scripts.
- 1 revision round included; source code handover via GitLab.
- Updated
- Exclusions: Production deployment (local/slim focus); custom themes beyond Murena; external OnlyOffice hosting setup.
Duration: 5 working days.
Day 1: Initial commits (app/samples). Days 2-3: Full integration. Days 4-5: Testing, polish, handover.
Total Cost: $365 (fixed price for full scope).
I'm confident this will exceed your expectations and supercharge your Nextcloud workspace with seamless OnlyOffice editing. Let's discuss any tweaks or questions—I'm available for a quick call to align. Looking forward to collaborating!
Best regards,
Sajid Khan
Top Rated Plus | Backend & DevOps Engineer
Certified: Google Cloud, AWS, Azure, Agile