Gibt es eine docker-compose die funktioniert

Hallo liebe Leute ich bin am verzweifeln .
gibte es eine docker-compose.yml die Funktioniert.

Ich habe zahlreiche probiert manche gehen kurzeitig manche gar nicht.
Wenn die Pro Version auch so ist dann Danke.

Hallo

Did get me some time to figure this out as well but I have it in production with storage on s3 and did a lot of googling on it.
I have seafile-pro running on ubuntu 18 and a 8GB memory VPS together with traefik.
With Installing libreoffice or collabora on the same server I had problems and had to install a another vps with it. (install is not described here)
You should have a dns directing to your server.
properly installed docker/docker-compose and firewall
(see digitalocean.com with nice installation procedures for it on ubuntu 18)
Hopefully you get it working. (be ware of using latest as a tag as it may corrupt your setup)
(you can reply in german)

mfg/regards
stephan

Steps are:
sudo -i
mkdir seafile
cd seafile
docker login docker.seadrive.org (passwd in customercenter)
docker network create --driver bridge --attachable --subnet=172.25.0.0/24 --gateway=172.25.0.10 seafile-net
Replace every value <…> with your own value in the files below.
docker-compose -f docker-compose-traefik.yml up -d
docker-compose -f docker-compose-seafile.yml up -d

FILES: beware that unfortunately the indentation is lost.

docker-compose-seafile.yml

version: ‘3’
services:
db:
image: mariadb:10.1
container_name: seafile-mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_LOG_CONSOLE=true
volumes:
- ./seafile-mysql/db:/var/lib/mysql
networks:
seafile-net:
ipv4_address: 172.25.0.3

memcached:
image: memcached:latest
container_name: seafile-memcached
restart: unless-stopped
entrypoint: memcached -m 256
ports:
- “11211:11211”
networks:
seafile-net:
ipv4_address: 172.25.0.4
command: [“memcached -m 256”]

elasticsearch: # not needed
image: seafileltd/elasticsearch-with-ik:5.6.16
container_name: seafile-elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- “ES_JAVA_OPTS=-Xms1g -Xmx1g”
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- ./seafile-elasticsearch_data:/usr/share/elasticsearch/data # specifies the path to Elasticsearch data persistent store.
networks:
- seafile-net
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:7.1.7
image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
container_name: seafile
restart: unless-stopped
ports:
- “7080:80”
volumes:
- /etc/localtime:/etc/localtime:ro
- ./seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD= # Requested, the value shuold be root’s password of MySQL service.
- TIME_ZONE=Europe/Amsterdam # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL= # Specifies Seafile admin user default is ‘me@example.com’
- SEAFILE_ADMIN_PASSWORD= # Specifies Seafile admin password, default is ‘asecret’.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_DB_USER=seafile
- SEAFILE_SERVER_HOSTNAME=<xxxxx.yyyyyyy.zz> # Specifies your host name if https is enabled.
- SEAFILE_SERVER_URL=https://<xxxxx.yyyyyy.zz> # Specifies your host name if https is enabled.
- SEAFILE_SERVICE_URL=https:<//<xxxxx.yyyyyy.zz> # Specifies your host name if https is enabled.
- SEAFILE_FILE_SERVER_ROOT=https://<xxxxx.yyyyy.zz>/seafhttp
labels:
- “traefik.enable=true”
- “traefik.http.routers.seafile.entrypoints=http”
- “traefik.http.routers.seafile.rule=Host(<xxxxx.yyyyy.zz>)”
- “traefik.http.middlewares.seafile-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.seafile.middlewares=seafile-https-redirect”
- “traefik.http.routers.seafile-secure.entrypoints=https”
- “traefik.http.routers.seafile-secure.rule=Host(<xxxxx.yyyyy.zz>)”
- “traefik.http.routers.seafile-secure.tls=true”
- “traefik.http.routers.seafile-secure.tls.certresolver=http”
- “traefik.http.routers.seafile-secure.service=seafile”
- “traefik.http.services.seafile.loadbalancer.server.port=80”
- “traefik.docker.network=seafile-net”
- “traefik.http.routers.seafile-secure.middlewares=seafile-dav,secHeaders@file”
- “traefik.http.middlewares.seafile-dav.replacepathregex.regex=^/.well-known/ca(l|rd)dav”
- “traefik.http.middlewares.seafile-dav.replacepathregex.replacement=/remote.php/dav/”
depends_on:
- db
- memcached
extra_hosts:
- “<xxxxx.yyyyy.zz>:172.25.0.5”
dns: 8.8.8.8
networks:
seafile-net:
ipv4_address: 172.25.0.5
networks:
seafile-net:
external: true

docker-compose-traefik.yml

version: ‘3’
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
command:
- “–log.level=DEBUG”
- “–providers.docker=true”
- --providers.docker=true
- --api
security_opt:
- no-new-privileges:true
ports:
- “80:80”
- “8080:8080”
- “443:443”
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik-data/traefik.yml:/traefik.yml
- ./traefik-data/acme.json:/acme.json
- ./traefik-data/dynamic_conf.yml:/dynamic_conf.yml
labels:
- “traefik.enable=true”
- “traefik.http.routers.traefik.entrypoints=http”
- “traefik.http.routers.traefik.rule=Host(traefik.<yyyyy.zz>)”
- “traefik.http.middlewares.traefik-auth.basicauth.users=admin:”
- “traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.traefik.middlewares=traefik-https-redirect”
- “traefik.http.routers.traefik-secure.entrypoints=https”
- “traefik.http.routers.traefik-secure.rule=Host(traefik.<yyyyyy.zz>)”
- “traefik.http.routers.traefik-secure.middlewares=traefik-auth,secHeaders@file”
- “traefik.http.routers.traefik-secure.tls=true”
- “traefik.http.routers.traefik-secure.tls.certresolver=http”
- “traefik.http.routers.traefik-secure.service=api@internal”
- “providers.file.filename=/dynamic_conf.yml”
networks:
seafile-net:
ipv4_address: 172.25.0.11

./traefik-data/dynamic_conf.yml

tls:
options:
default:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
- TLS_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
curvePreferences:
- CurveP521
- CurveP384
sniStrict: true
http:
middlewares:
secHeaders:
headers:
browserXssFilter: true
contentTypeNosniff: true
frameDeny: true
sslRedirect: true
#HSTS Configuration
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 31536000
customFrameOptionsValue: “SAMEORIGIN”

./traefik-data/traefik.yml

api:
dashboard: true
entryPoints:
http:
address: “:80”
https:
address: “:443”
providers:
docker:
endpoint: “unix:///var/run/docker.sock”
exposedByDefault: false
file:
filename: “/dynamic_conf.yml”
certificatesResolvers:
http:
acme:
email:
storage: acme.json
httpChallenge:
entryPoint: http

Danke für die Antwort :slightly_smiling_face:

Ich habe meinen Server zuhause ein 8 Kerner mit 12GB Ram
Ich brauche nicht die Pro Version die kann ich mir nicht leisten.

Mfg Wolfgang

up to 3 usrs it is free

i use a very similar docker-compose.yml file. But I always get the following error message in the Docker Logs:

*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 15
*** Running /scripts/start.py...

Checking python on this machine ...
Cecking for java ...Done.
verifying password of user root ...  done
[2020-11-02 13:45:48] Now running setup-seafile-mysql.py in auto mode.
verifying password of user seafile ...  
Failed to connect to mysql server using user "seafile" and password "***": Access denied for user 'seafile'@'172.17.0.7' (using password: YES)

Just like in your docker-compose file I only set the MYSQL_ROOT_PASSWORD the DB_ROOT Password and SEAFILE_DB_USER=seafile

How can I fix this error? Unfortunately I have not found anything on Google. Did you ever had this error?

Dear Niklas

I guess it is related to a not completed install of the mysql database.
Get in to docker mysql by:
docker exec -it seafile-mysql /bin/bash
than execute: mysql -uroot -p and check with use show databases; and use seafile_db show tables if all tables exist.
If that is ok than maybe there is an issue with rights.
to check:
use mysql; select * from user; /
result should be host %.%.%.% for user seafile
and check if you get in by mysql -u’seafile’@‘172.17.0.7’ -p
If not google to get these permission right.

Otherwise I need your full *yml file without secret details

Good luck