--- version: "3.7" services: traefik: image: traefik:v2.6.6 networks: ocis-net: aliases: - ${OCIS_DOMAIN:-ocis.owncloud.test} command: - "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}" # letsencrypt configuration - "--certificatesResolvers.http.acme.email=${TRAEFIK_ACME_MAIL:-example@example.org}" - "--certificatesResolvers.http.acme.storage=/certs/acme.json" - "--certificatesResolvers.http.acme.httpChallenge.entryPoint=http" # enable dashboard - "--api.dashboard=true" # define entrypoints - "--entryPoints.http.address=:80" - "--entryPoints.http.http.redirections.entryPoint.to=https" - "--entryPoints.http.http.redirections.entryPoint.scheme=https" - "--entryPoints.https.address=:443" # docker provider (get configuration from container labels) - "--providers.docker.endpoint=unix:///var/run/docker.sock" - "--providers.docker.exposedByDefault=false" ports: - "80:80" - "443:443" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - "certs:/certs" labels: - "traefik.enable=${TRAEFIK_DASHBOARD:-false}" - "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_BASIC_AUTH_USERS:-admin:$$apr1$$4vqie50r$$YQAmQdtmz5n9rEALhxJ4l.}" # defaults to admin:admin - "traefik.http.routers.traefik.entrypoints=https" - "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DOMAIN:-traefik.owncloud.test}`)" - "traefik.http.routers.traefik.middlewares=traefik-auth" - "traefik.http.routers.traefik.tls.certresolver=http" - "traefik.http.routers.traefik.service=api@internal" logging: driver: "local" restart: always ocis: image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} networks: ocis-net: depends_on: - ldap-server entrypoint: - /bin/sh # run ocis init to initialize a configuration file with random secrets # it will fail on subsequent runs, because the config file already exists # therefore we ignore the error and then start the ocis server command: ["-c", "ocis init || true; ocis server"] environment: # users/gropups from ldap LDAP_URI: ldaps://ldap-server LDAP_INSECURE: "true" LDAP_BIND_DN: "cn=admin,dc=owncloud,dc=com" LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin} LDAP_GROUP_BASE_DN: "dc=owncloud,dc=com" LDAP_GROUP_FILTER: "(objectclass=owncloud)" LDAP_GROUP_OBJECTCLASS: "groupOfUniqueNames" LDAP_USER_BASE_DN: "dc=owncloud,dc=com" LDAP_USER_FILTER: "(objectclass=owncloud)" LDAP_USER_OBJECTCLASS: "inetOrgPerson" LDAP_LOGIN_ATTRIBUTES: "uid" OCIS_ADMIN_USER_ID: "ddc2004c-0977-11eb-9d3f-a793888cd0f8" IDP_LDAP_URI: ldap://ldap-server IDP_LDAP_LOGIN_ATTRIBUTE: "uid" IDP_LDAP_UUID_ATTRIBUTE: "ownclouduuid" IDP_LDAP_UUID_ATTRIBUTE_TYPE: binary GRAPH_LDAP_SERVER_WRITE_ENABLED: "false" # assuming the external ldap is readonly # OCIS_RUN_SERVICES specifies to start all services except glauth, idm and accounts. These are replaced by external services OCIS_RUN_SERVICES: app-registry,app-provider,audit,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,idp,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav # General oCIS config OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test} OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}" PROXY_TLS: "false" # do not use SSL between Traefik and oCIS # INSECURE: needed if oCIS / Traefik is using self generated certificates OCIS_INSECURE: "${INSECURE:-false}" # basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect) PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}" # admin user password volumes: - ocis-config:/etc/ocis - ocis-data:/var/lib/ocis labels: - "traefik.enable=true" - "traefik.http.routers.ocis.entrypoints=https" - "traefik.http.routers.ocis.rule=Host(`${OCIS_DOMAIN:-ocis.owncloud.test}`)" - "traefik.http.routers.ocis.tls.certresolver=http" - "traefik.http.routers.ocis.service=ocis" - "traefik.http.services.ocis.loadbalancer.server.port=9200" logging: driver: "local" restart: always ldap-server: image: osixia/openldap:latest networks: ocis-net: command: --copy-service --loglevel debug environment: LDAP_TLS_VERIFY_CLIENT: never LDAP_DOMAIN: owncloud.com LDAP_ORGANISATION: ownCloud LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin} LDAP_RFC2307BIS_SCHEMA: "true" LDAP_REMOVE_CONFIG_AFTER_SETUP: "false" ports: - "127.0.0.1:389:389" - "127.0.0.1:636:636" volumes: - ./config/ldap/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom logging: driver: "local" restart: always ldap-manager: image: osixia/phpldapadmin:latest networks: ocis-net: environment: PHPLDAPADMIN_LDAP_HOSTS: ldap-server PHPLDAPADMIN_HTTPS: "false" labels: - "traefik.enable=true" - "traefik.http.routers.ldap-manager.entrypoints=https" - "traefik.http.routers.ldap-manager.rule=Host(`${LDAP_MANAGER_DOMAIN:-ldap.owncloud.test}`)" - "traefik.http.routers.ldap-manager.tls.certresolver=http" - "traefik.http.routers.ldap-manager.service=ldap-manager" - "traefik.http.services.ldap-manager.loadbalancer.server.port=80" logging: driver: "local" restart: always volumes: certs: ocis-config: ocis-data: networks: ocis-net: