2021-06-15 08:32:24 +02:00
---
version : "3.7"
services :
traefik :
2022-10-07 09:50:06 +02:00
image : traefik:v2.9.1
2021-06-15 08:32:24 +02:00
networks :
ocis-net :
aliases :
- ${OCIS_DOMAIN:-ocis.owncloud.test}
command :
2021-07-15 09:17:47 +02:00
- "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}"
# letsencrypt configuration
2021-06-15 08:32:24 +02:00
- "--certificatesResolvers.http.acme.email=${TRAEFIK_ACME_MAIL:-example@example.org}"
- "--certificatesResolvers.http.acme.storage=/certs/acme.json"
- "--certificatesResolvers.http.acme.httpChallenge.entryPoint=http"
2021-09-17 05:21:38 -04:00
# enable dashboard
2021-06-15 08:32:24 +02:00
- "--api.dashboard=true"
2021-07-15 09:17:47 +02:00
# define entrypoints
2021-06-15 08:32:24 +02: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"
2021-06-15 08:32:24 +02:00
- "--entryPoints.https.address=:443"
2021-07-15 09:17:47 +02:00
# docker provider (get configuration from container labels)
2021-06-15 08:32:24 +02: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"
2021-06-15 08:32:24 +02:00
ports :
- "80:80"
- "443:443"
volumes :
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "certs:/certs"
labels :
- "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-06-15 08:32:24 +02:00
logging :
driver : "local"
restart : always
ocis :
image : owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
networks :
ocis-net :
entrypoint :
- /bin/sh
2022-05-05 09:27:59 +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" ]
2021-06-15 08:32:24 +02:00
environment :
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-06-15 08:32:24 +02:00
PROXY_TLS : "false" # do not use SSL between Traefik and oCIS
2021-10-27 15:07:42 +02:00
# make settings service available to oCIS Hello
SETTINGS_GRPC_ADDR : 0.0.0.0 : 9191
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)
2022-02-08 10:05:43 +01:00
PROXY_ENABLE_BASIC_AUTH : "${PROXY_ENABLE_BASIC_AUTH:-false}"
2022-05-05 09:27:59 +02:00
# admin user password
IDM_ADMIN_PASSWORD : "${ADMIN_PASSWORD:-admin}" # this overrides the admin password from the configuration file
2022-04-09 16:17:03 +02:00
# demo users
IDM_CREATE_DEMO_USERS : "${DEMO_USERS:-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"
2021-06-15 08:32:24 +02:00
volumes :
2023-11-22 15:24:24 +01:00
- ./config/ocis/banned-password-list.txt:/etc/ocis/banned-password-list.txt
2022-03-23 08:18:03 +01:00
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
2022-05-05 09:27:59 +02:00
- ./config/ocis/web.yaml:/etc/ocis/web.yaml
- ocis-config:/etc/ocis
2021-10-07 14:30:08 +02:00
- ocis-data:/var/lib/ocis
2021-06-15 08:32:24 +02:00
labels :
- "traefik.enable=true"
2021-07-15 09:17:47 +02:00
- "traefik.http.routers.ocis.entrypoints=https"
2021-06-15 08:32:24 +02: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"
2021-06-15 08:32:24 +02:00
- "traefik.http.services.ocis.loadbalancer.server.port=9200"
logging :
driver : "local"
restart : always
ocis-hello :
image : owncloud/ocis-hello:${OCIS_HELLO_DOCKER_TAG:-latest}
networks :
ocis-net :
environment :
2022-11-16 15:54:10 +01:00
OCIS_LOG_LEVEL : ${OCIS_LOG_LEVEL:-info}
2021-06-15 08:32:24 +02:00
logging :
driver : "local"
restart : always
volumes :
certs :
2022-05-05 09:27:59 +02:00
ocis-config :
2021-06-15 08:32:24 +02:00
ocis-data :
networks :
ocis-net :