I’m following this guide for seafile 7.x.x, on Ubuntu 18.04:
Following the steps in the guide, I’ve downloaded docker compose: apt-get install docker-compose -y
I’ve changed MYSQL_ROOT_PASSWORD and DB_ROOT_PASSWD.
The guide says I should also change these two values: The volume directory of MySQL data (volumes) The volume directory of Seafile data (volumes).
But I have left them as the default values because those file paths look fine to me.
I then start seafile with: docker-compose up -d
It starts up fine.
However, while on the local network, if I go to the ip address of the server (192.168.1.248:80), it says problem loading webpage…cannot connect.
version: '2.0'
services:
db:
image: mariadb:10.1
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=[password1] # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- "80:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /opt/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=[password1] # Requested, the value shuold be root's password of MySQL service.
- TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=[my email] # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=[password1] # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=False # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=192.168.1.248 # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
networks:
- seafile-net
networks:
seafile-net:
For anyone else running into this issue, its the timezone. Having a mismatch or incorrect timezone kills the docker container. I found this by playing around with a new install, which you cannot set the timezone in the seahub settings file as it doesnt have time to create.
Solutions: Comment out the timezone line in your docker compose file.