Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] Set up app-provider in docker compose #11838

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions dev/docker/ocis.idp.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 32 additions & 6 deletions dev/docker/ocis.storage.ocmproviders.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions dev/docker/ocis.web-federated.config.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
63 changes: 53 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down