2022-07-19 19:20:24 +02:00
---
2020-12-10 16:42:38 +01:00
version : "3.7"
services :
traefik :
2022-10-07 09:50:06 +02:00
image : traefik:v2.9.1
2020-12-10 16:42:38 +01:00
networks :
2021-01-26 10:33:28 +01:00
ocis-net :
2020-12-10 16:42:38 +01:00
aliases :
- ${OCIS_DOMAIN:-ocis.owncloud.test}
command :
2021-07-15 09:17:47 +02:00
- "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}"
# letsencrypt configuration
2020-12-28 07:36:08 +01:00
- "--certificatesResolvers.http.acme.email=${TRAEFIK_ACME_MAIL:-example@example.org}"
2020-12-10 16:42:38 +01:00
- "--certificatesResolvers.http.acme.storage=/certs/acme.json"
- "--certificatesResolvers.http.acme.httpChallenge.entryPoint=http"
2021-09-17 05:21:38 -04:00
# enable dashboard
2020-12-10 16:42:38 +01:00
- "--api.dashboard=true"
2021-07-15 09:17:47 +02:00
# define entrypoints
2020-12-10 16:42:38 +01:00
- "--entryPoints.http.address=:80"
2021-07-15 09:17:47 +02:00
- "--entryPoints.http.http.redirections.entryPoint.to=https"
- "--entryPoints.http.http.redirections.entryPoint.scheme=https"
2020-12-10 16:42:38 +01:00
- "--entryPoints.https.address=:443"
2021-07-15 09:17:47 +02:00
# docker provider (get configuration from container labels)
2020-12-10 16:42:38 +01:00
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.exposedByDefault=false"
2022-11-16 15:54:10 +01:00
# access log
- "--accessLog=true"
- "--accessLog.format=json"
- "--accessLog.fields.headers.names.X-Request-Id=keep"
2020-12-10 16:42:38 +01:00
ports :
- "80:80"
- "443:443"
volumes :
2023-02-23 12:22:56 +01:00
- "${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock:ro"
2020-12-10 16:42:38 +01:00
- "certs:/certs"
labels :
2021-01-21 19:07:55 +01:00
- "traefik.enable=${TRAEFIK_DASHBOARD:-false}"
2021-12-16 10:56:37 +01:00
- "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_BASIC_AUTH_USERS:-admin:$$apr1$$4vqie50r$$YQAmQdtmz5n9rEALhxJ4l.}" # defaults to admin:admin
2021-07-15 09:17:47 +02:00
- "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"
2021-01-22 08:51:20 +01:00
logging :
2023-02-23 12:22:56 +01:00
driver : ${LOG_DRIVER:-local}
2020-12-10 16:42:38 +01:00
restart : always
ocis :
2024-06-28 13:19:40 +02:00
image : ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
2021-01-26 10:33:28 +01:00
networks :
ocis-net :
2020-12-10 16:42:38 +01:00
depends_on :
- ldap-server
2021-09-07 13:06:37 +02:00
entrypoint :
- /bin/sh
2022-05-09 09:13:20 +02:00
# 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
2025-06-06 12:55:04 +02:00
command : [ "-c" , "ocis init || true; exec ocis server" ]
2020-12-10 16:42:38 +01:00
environment :
2024-06-21 08:26:52 +05:45
# users/groups from ldap
2025-11-18 18:17:27 +01:00
OCIS_LDAP_URI : ldaps://ldap-server:636
2023-08-22 16:22:07 +02:00
OCIS_LDAP_INSECURE : "true"
OCIS_LDAP_BIND_DN : "cn=admin,dc=owncloud,dc=com"
2024-01-08 15:33:38 +01:00
OCIS_LDAP_BIND_PASSWORD : ${LDAP_ADMIN_PASSWORD:-admin}
2023-08-22 16:22:07 +02:00
OCIS_LDAP_GROUP_BASE_DN : "ou=groups,dc=owncloud,dc=com"
OCIS_LDAP_GROUP_FILTER : "(objectclass=owncloud)"
OCIS_LDAP_GROUP_OBJECTCLASS : "groupOfNames"
OCIS_LDAP_USER_BASE_DN : "ou=users,dc=owncloud,dc=com"
OCIS_LDAP_USER_FILTER : "(objectclass=owncloud)"
OCIS_LDAP_USER_OBJECTCLASS : "inetOrgPerson"
2023-08-22 16:48:16 +02:00
LDAP_LOGIN_ATTRIBUTES : "uid"
2022-07-20 09:20:49 +02:00
OCIS_ADMIN_USER_ID : "ddc2004c-0977-11eb-9d3f-a793888cd0f8"
2022-04-11 12:35:17 +02:00
IDP_LDAP_LOGIN_ATTRIBUTE : "uid"
2021-02-09 16:00:04 +01:00
IDP_LDAP_UUID_ATTRIBUTE : "ownclouduuid"
IDP_LDAP_UUID_ATTRIBUTE_TYPE : binary
2023-02-20 13:40:42 +01:00
GRAPH_LDAP_SERVER_WRITE_ENABLED : "true" # assuming the external ldap is writable
2023-02-20 13:02:42 +01:00
GRAPH_LDAP_REFINT_ENABLED : "true" # osixia has refint enabled.
2022-06-20 16:49:06 +02:00
# OCIS_RUN_SERVICES specifies to start all services except glauth, idm and accounts. These are replaced by external services
2023-05-03 10:40:22 +02:00
OCIS_EXCLUDE_RUN_SERVICES : idm
2021-01-28 00:32:47 +00:00
# General oCIS config
2020-12-21 16:20:02 +00:00
OCIS_URL : https://${OCIS_DOMAIN:-ocis.owncloud.test}
2022-11-16 15:54:10 +01:00
OCIS_LOG_LEVEL : ${OCIS_LOG_LEVEL:-info}
2022-06-08 15:54:43 +02:00
OCIS_LOG_COLOR : "${OCIS_LOG_COLOR:-false}"
2021-05-10 08:54:08 +02:00
PROXY_TLS : "false" # do not use SSL between Traefik and oCIS
2021-11-10 16:23:37 +01:00
# INSECURE: needed if oCIS / Traefik is using self generated certificates
2021-11-10 16:55:12 +01:00
OCIS_INSECURE : "${INSECURE:-false}"
2024-06-21 08:26:52 +05:45
# basic auth (not recommended, but needed for e.g., WebDav clients that do not support OpenID Connect)
2023-02-20 13:33:07 +01:00
PROXY_ENABLE_BASIC_AUTH : "${PROXY_ENABLE_BASIC_AUTH:-false}"
2023-11-22 15:24:24 +01:00
# password policies
2023-12-06 14:30:54 +01:00
OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST : "banned-password-list.txt"
2020-12-10 16:42:38 +01:00
volumes :
2023-11-22 15:24:24 +01:00
- ./config/ocis/banned-password-list.txt:/etc/ocis/banned-password-list.txt
2022-05-09 09:13:20 +02:00
- ocis-config:/etc/ocis
2021-10-07 14:30:08 +02:00
- ocis-data:/var/lib/ocis
2020-12-10 16:42:38 +01:00
labels :
- "traefik.enable=true"
2021-07-15 09:17:47 +02:00
- "traefik.http.routers.ocis.entrypoints=https"
2020-12-10 16:42:38 +01:00
- "traefik.http.routers.ocis.rule=Host(`${OCIS_DOMAIN:-ocis.owncloud.test}`)"
2021-07-15 09:17:47 +02:00
- "traefik.http.routers.ocis.tls.certresolver=http"
- "traefik.http.routers.ocis.service=ocis"
2020-12-10 16:42:38 +01:00
- "traefik.http.services.ocis.loadbalancer.server.port=9200"
2021-01-21 15:58:52 +01:00
logging :
2023-02-23 12:22:56 +01:00
driver : ${LOG_DRIVER:-local}
2020-12-10 16:42:38 +01:00
restart : always
ldap-server :
2025-11-18 18:17:27 +01:00
image : osixia/openldap:1.5.0
2021-01-26 10:33:28 +01:00
networks :
ocis-net :
2020-12-10 16:42:38 +01:00
environment :
LDAP_TLS_VERIFY_CLIENT : never
2025-11-18 18:17:27 +01:00
LDAP_TLS : true
LDAP_ORGANISATION : owncloud
LDAP_DOMAIN : owncloud.com
2023-02-23 14:02:18 +01:00
LDAP_ROOT : "dc=owncloud,dc=com"
2020-12-10 16:42:38 +01:00
LDAP_ADMIN_PASSWORD : ${LDAP_ADMIN_PASSWORD:-admin}
2025-11-18 18:17:27 +01:00
LDAP_SEED_INTERNAL_LDIF_PATH : /ldifs
LDAP_SEED_INTERNAL_SCHEMA_PATH : /schemas
2020-12-18 10:15:58 +01:00
ports :
2025-11-18 18:17:27 +01:00
- "127.0.0.1:389:389"
- "127.0.0.1:636:636"
2020-12-10 16:42:38 +01:00
volumes :
2023-02-23 14:02:18 +01:00
- ./config/ldap/ldif:/ldifs
- ./config/ldap/schemas:/schemas
2025-11-18 18:17:27 +01:00
- ldap-certs:/container/service/slapd/assets/certs
- ldap-data:/var/lib/ldap
- ldap-config:/etc/ldap/slapd.d
2021-01-21 15:58:52 +01:00
logging :
2023-02-23 12:22:56 +01:00
driver : ${LOG_DRIVER:-local}
2020-12-10 16:42:38 +01:00
restart : always
ldap-manager :
2022-05-09 09:13:20 +02:00
image : osixia/phpldapadmin:latest
2021-01-26 10:33:28 +01:00
networks :
ocis-net :
2020-12-10 16:42:38 +01:00
environment :
2025-11-18 18:17:27 +01:00
PHPLDAPADMIN_LDAP_HOSTS : "#PYTHON2BASH:[{'ldap-server': [{'server': [{'port': 389}]}]}]"
2020-12-10 16:42:38 +01:00
PHPLDAPADMIN_HTTPS : "false"
labels :
- "traefik.enable=true"
2021-07-15 09:17:47 +02:00
- "traefik.http.routers.ldap-manager.entrypoints=https"
2020-12-10 16:42:38 +01:00
- "traefik.http.routers.ldap-manager.rule=Host(`${LDAP_MANAGER_DOMAIN:-ldap.owncloud.test}`)"
2021-07-15 09:17:47 +02:00
- "traefik.http.routers.ldap-manager.tls.certresolver=http"
- "traefik.http.routers.ldap-manager.service=ldap-manager"
2020-12-10 16:42:38 +01:00
- "traefik.http.services.ldap-manager.loadbalancer.server.port=80"
2021-01-21 15:58:52 +01:00
logging :
2023-02-23 12:22:56 +01:00
driver : ${LOG_DRIVER:-local}
2020-12-10 16:42:38 +01:00
restart : always
volumes :
certs :
2023-02-23 14:02:18 +01:00
ldap-certs :
2022-05-09 09:13:20 +02:00
ocis-config :
2020-12-10 16:42:38 +01:00
ocis-data :
2024-11-04 10:32:25 +01:00
ldap-data :
2025-11-18 18:17:27 +01:00
ldap-config :
2021-01-26 10:33:28 +01:00
2023-02-20 13:02:42 +01:00
2021-01-26 10:33:28 +01:00
networks :
ocis-net :