Skip to content

Commit

Permalink
Add docker-compose.yml for nextcloud development
Browse files Browse the repository at this point in the history
This is similar to what we already have for Keycloak and GitLab
in providing a minimal docker-compose file for integration work.
  • Loading branch information
NobodysNightmare committed Dec 10, 2024
1 parent 22f0a8d commit 549f2ff
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docker/dev/nextcloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
A minimal setup to run a Nextcloud inside the TLS-enabled docker development stack.

# First installation steps

1. Allow accessing OP through `openproject.local`:
* `docker compose exec --user www-data nextcloud php occ config:system:set allow_local_remote_servers --value 1`
2. Import Dev CA cert into Nextcloud's own certificate store:
* `docker compose cp /path/to/your/OpenProject_Development_Root_CA.crt nextcloud:/tmp/root.crt`
* `docker compose exec nextcloud chown www-data /tmp/root.crt`
* `docker compose exec --user www-data nextcloud php occ security:certificates:import /tmp/root.crt`
3. Following [docs](https://docs.nextcloud.com/server/30/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies) configure Traefik as trusted proxy
* e.g. add `'trusted_proxies' => ['172.0.0.0/8'],` to `config/config.php` for a pretty broad allowance for most docker services (verify that your `gateway` network uses IPs in the given address range)
4. Download/Activate Nextcloud plugins:
* `integration_openproject`
* `groupfolders` (dependency for certain OP functions)
23 changes: 23 additions & 0 deletions docker/dev/nextcloud/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
nextcloud:
image: nextcloud:stable
restart: unless-stopped
networks:
- gateway
volumes:
- nextcloud:/var/www/html
# If you want to use a local version of a plugin, mount a local folder
# more detailed instructions available at https://github.com/nextcloud/integration_openproject/blob/master/docs/setup_via_docker.md
# - ../nextcloud_apps:/var/www/html/custom_apps
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.local`)"
- "traefik.http.routers.nextcloud.entrypoints=websecure"

networks:
gateway:
external: true
name: gateway

volumes:
nextcloud:

0 comments on commit 549f2ff

Please sign in to comment.