diff --git a/dev/docker/ocis.idp.config.yaml b/dev/docker/ocis.idp.config.yaml index ae4faf852f9..0d710702762 100644 --- a/dev/docker/ocis.idp.config.yaml +++ b/dev/docker/ocis.idp.config.yaml @@ -11,17 +11,17 @@ clients: - https://host.docker.internal:9201/ - https://host.docker.internal:9201/oidc-callback.html - https://host.docker.internal:9201/oidc-silent-redirect.html - - https://ocis.owncloud.test:10200/ - - https://ocis.owncloud.test:10200/oidc-callback.html - - https://ocis.owncloud.test:10200/oidc-silent-redirect.html - - https://ocis.owncloud.test:10201/ - - https://ocis.owncloud.test:10201/oidc-callback.html - - https://ocis.owncloud.test:10201/oidc-silent-redirect.html + - https://host.docker.internal:10200/ + - https://host.docker.internal:10200/oidc-callback.html + - https://host.docker.internal:10200/oidc-silent-redirect.html + - https://host.docker.internal:10201/ + - https://host.docker.internal:10201/oidc-callback.html + - https://host.docker.internal:10201/oidc-silent-redirect.html origins: - https://host.docker.internal:9200 - https://host.docker.internal:9201 - - https://ocis.owncloud.test:10200 - - https://ocis.owncloud.test:10201 + - https://host.docker.internal:10200 + - https://host.docker.internal:10201 - id: "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69" name: ownCloud desktop client diff --git a/dev/docker/ocis.storage.ocmproviders.json b/dev/docker/ocis.storage.ocmproviders.json index 6e483e246aa..b1d758e0789 100644 --- a/dev/docker/ocis.storage.ocmproviders.json +++ b/dev/docker/ocis.storage.ocmproviders.json @@ -18,28 +18,54 @@ }, "api_version": "0.0.1", "host": "host.docker.internal:9200" + }, + { + "endpoint": { + "type": { + "name": "Webdav", + "description": "ownCloud Open Cloud Mesh API" + }, + "name": "ownCloud - OCM API", + "path": "https://host.docker.internal:9200/dav/", + "is_monitored": true + }, + "api_version": "0.0.1", + "host": "host.docker.internal:9200" } ] }, { - "name": "ocis.owncloud.test:10200", - "full_name": "ocis.owncloud.test 10200", + "name": "host.docker.internal:10200", + "full_name": "host.docker.internal 10200", "organization": "ownCloud", - "domain": "ocis.owncloud.test:10200", + "domain": "host.docker.internal:10200", "homepage": "https://owncloud.com", "services": [ { "endpoint": { "type": { "name": "OCM", - "description": "ownCloud Open Cloud Mesh API" + "description": "ownCloud Webdav API" + }, + "name": "ownCloud - OCM API", + "path": "https://host.docker.internal:10200/ocm/", + "is_monitored": true + }, + "api_version": "0.0.1", + "host": "host.docker.internal:10200" + }, + { + "endpoint": { + "type": { + "name": "Webdav", + "description": "ownCloud WebdavAPI" }, "name": "ownCloud - OCM API", - "path": "https://ocis.owncloud.test:10200/ocm/", + "path": "https://host.docker.internal:10200/dav/", "is_monitored": true }, "api_version": "0.0.1", - "host": "ocis.owncloud.test:10200" + "host": "host.docker.internal:10200" } ] } diff --git a/dev/docker/ocis.web-federated.config.json b/dev/docker/ocis.web-federated.config.json index 0147a398f47..17b2839a606 100644 --- a/dev/docker/ocis.web-federated.config.json +++ b/dev/docker/ocis.web-federated.config.json @@ -1,9 +1,9 @@ { - "server": "https://ocis.owncloud.test:10200", - "theme": "https://ocis.owncloud.test:10200/themes/owncloud/theme.json", + "server": "https://host.docker.internal:10200", + "theme": "https://host.docker.internal:10200/themes/owncloud/theme.json", "openIdConnect": { - "metadata_url": "https://ocis.owncloud.test:10200/.well-known/openid-configuration", - "authority": "https://ocis.owncloud.test:10200", + "metadata_url": "https://host.docker.internal:10200/.well-known/openid-configuration", + "authority": "https://host.docker.internal:10200", "client_id": "web", "response_type": "code", "scope": "openid profile email" diff --git a/docker-compose.yml b/docker-compose.yml index d1fcc0780a9..e545d089556 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,7 +74,6 @@ x-ocis-server: &ocis-service extra_hosts: - host.docker.internal:${DOCKER_HOST:-host-gateway} - - ocis.owncloud.test:${DOCKER_HOST:-host-gateway} restart: unless-stopped depends_on: - traefik @@ -123,22 +122,29 @@ services: container_name: web_ocis_federated environment: <<: *ocis-environment - OCIS_URL: https://ocis.owncloud.test:10200 - OCIS_CORS_ALLOW_ORIGINS: https://ocis.owncloud.test:10201 - OCM_WEBAPP_TEMPLATE: https://ocis.owncloud.test:10201/o/{{.Token}}/{relative-path-to-shared-resource} + OCIS_URL: ${OCIS_OCM_URL:-https://host.docker.internal:10200} + OCIS_CORS_ALLOW_ORIGINS: https://host.docker.internal:10200,https://host.docker.internal:10201 + OCM_WEBAPP_TEMPLATE: https://host.docker.internal:10201/o/{{.Token}}/{relative-path-to-shared-resource} + MICRO_REGISTRY: 'nats-js-kv' + MICRO_REGISTRY_ADDRESS: 0.0.0.0:9233 + PROXY_CSP_CONFIG_FILE_LOCATION: /etc/ocis/csp.yaml + COLLABORA_DOMAIN: host.docker.internal:9980 + FRONTEND_APP_HANDLER_SECURE_VIEW_APP_ADDR: com.owncloud.api.collaboration.Collabora labels: traefik.enable: true traefik.http.routers.ocis-federated.tls: true - traefik.http.routers.ocis-federated.rule: Host(`ocis.owncloud.test`) && PathPrefix(`/`) + traefik.http.routers.ocis-federated.rule: Host(`host.docker.internal`) && PathPrefix(`/`) traefik.http.routers.ocis-federated.entrypoints: ocis-federated traefik.http.services.ocis-federated.loadbalancer.server.port: 9200 # workaround: https://github.com/owncloud/ocis/issues/5108 traefik.http.routers.ocis-federated.middlewares: cors volumes: + - ./dev/docker/ocis/csp.yaml:/etc/ocis/csp.yaml - ./dev/docker/ocis/password-policy-banned-passwords.txt:/etc/ocis/password-policy-banned-passwords.txt - ./dev/docker/ocis.idp.config.yaml:/etc/ocis/idp.yaml - ./dev/docker/ocis-ca:/var/lib/ocis/proxy - ./dev/docker/ocis.storage.ocmproviders.json:/etc/ocis/ocmproviders.json + - ./dev/docker/apps:/web/apps - ./dist:/web/dist - ./dev/docker/ocis/app-registry.yaml:/etc/ocis/app-registry.yaml - ocis-federated-config:/etc/ocis @@ -174,7 +180,7 @@ services: labels: traefik.enable: true traefik.http.routers.collaboration.tls: true - traefik.http.routers.collaboration.rule: PathPrefix(`/`) + traefik.http.routers.collaboration.rule: Host(`host.docker.internal`) && PathPrefix(`/`) traefik.http.routers.collaboration.entrypoints: collaboration traefik.http.services.collaboration.loadbalancer.server.port: 9300 logging: @@ -186,7 +192,7 @@ services: command: ['bash', '-c', 'coolconfig generate-proof-key ; /start-collabora-online.sh'] environment: DONT_GEN_SSL_CERT: YES - extra_params: --o:ssl.enable=false --o:ssl.ssl_verification=false --o:ssl.termination=true --o:welcome.enable=false --o:net.frame_ancestors=${OCIS_URL:-https://host.docker.internal:9200} + extra_params: --o:ssl.enable=false --o:ssl.ssl_verification=false --o:ssl.termination=true --o:welcome.enable=false --o:net.frame_ancestors=${OCIS_URL:-https://host.docker.internal:10200} ${OCIS_OCM_URL:-https://host.docker.internal:9200} --o:alias_group=host.docker.internal:9300|host.docker.internal:10300 username: ${COLLABORA_ADMIN_USER:-admin} password: ${COLLABORA_ADMIN_PASSWORD:-admin} cap_add: @@ -198,13 +204,50 @@ services: labels: traefik.enable: true traefik.http.routers.collabora.tls: true - traefik.http.routers.collabora.rule: PathPrefix(`/`) + traefik.http.routers.collabora.rule: Host(`host.docker.internal`) && PathPrefix(`/`) traefik.http.routers.collabora.entrypoints: collabora traefik.http.services.collabora.loadbalancer.server.port: 9980 restart: always depends_on: - traefik + collaboration-ocm: + image: ${OCIS_IMAGE:-owncloud/ocis-rolling:master} + depends_on: + ocis-federated: + condition: service_started + collabora: + condition: service_healthy + entrypoint: + - /bin/sh + command: ['-c', 'ocis collaboration server'] + environment: + COLLABORATION_GRPC_ADDR: 0.0.0.0:10301 + COLLABORATION_HTTP_ADDR: 0.0.0.0:10300 + MICRO_REGISTRY: nats-js-kv + MICRO_REGISTRY_ADDRESS: ocis-federated:9233 + COLLABORATION_WOPI_SRC: https://${WOPISERVER_DOMAIN:-host.docker.internal:10300} + COLLABORATION_APP_NAME: Collabora + COLLABORATION_APP_ADDR: https://${COLLABORA_DOMAIN:-host.docker.internal:9980} + COLLABORATION_APP_ICON: https://${COLLABORA_DOMAIN:-host.docker.internal:9980}/favicon.ico + COLLABORATION_APP_INSECURE: ${INSECURE:-true} + COLLABORATION_CS3API_DATAGATEWAY_INSECURE: ${INSECURE:-true} + COLLABORATION_LOG_LEVEL: ${LOG_LEVEL:-info} + OCIS_URL: ${OCIS_OCM_URL:-https://host.docker.internal:10200} + extra_hosts: + - host.docker.internal:${DOCKER_HOST:-host-gateway} + volumes: + - ocis-config:/etc/ocis + labels: + traefik.enable: true + traefik.http.routers.collaboration-ocm.tls: true + traefik.http.routers.collaboration-ocm.rule: Host(`host.docker.internal`) && PathPrefix(`/`) + traefik.http.routers.collaboration-ocm.entrypoints: collaboration-ocm + traefik.http.services.collaboration-ocm.loadbalancer.server.port: 10300 + logging: + driver: ${LOG_DRIVER:-local} + restart: always + collaboration-oo: image: ${OCIS_IMAGE:-owncloud/ocis-rolling:master} depends_on: @@ -290,8 +333,8 @@ services: - '--entrypoints.ocis.address=:9200' - '--entrypoints.ocis-federated.address=:10200' - '--entrypoints.collabora.address=:9980' - - '--entrypoints.wopi.address=:8880' - '--entrypoints.collaboration.address=:9300' + - '--entrypoints.collaboration-ocm.address=:10300' - '--entrypoints.collaboration-oo.address=:9302' - '--entrypoints.websecure.address=:443' - '--entrypoints.websecure.http.middlewares=https_config@docker' @@ -316,9 +359,9 @@ services: - '9200:9200' - '9300:9300' - '9302:9302' + - '10300:10300' - '10200:10200' - '9980:9980' - - '8880:8880' - '9981:443' volumes: - './dev/docker/traefik/certificates:/certificates'