Worth sharing, as I have invested a considerable amount of time in having style sheets working as supposed to.
seafile/docker-compose.yml (no volumes, just insert some to enforce persistence and no ssl for simplicity):
version: '2' services: seafile: image: seafileltd/seafile:6.3.4 restart: always ports: - 8080:80 environment: SEAFILE_SERVER_HOSTNAME: myseafile.com SEAFILE_ADMIN_EMAIL: admin SEAFILE_ADMIN_PASSWORD: changeme proxy: image: jmferrer/apache2-reverse-proxy restart: always ports: - 80:80
start your stack (check indentation of the above )
Add “myseafile.com” into /etc/hosts of the hosting machine or set up your dns
In seafile_seafile_1 container:
vi /shared/seafile/conf/seahub_settings.py and add:
SERVE_STATIC = False
MEDIA_URL = ‘/datashare/media/’
COMPRESS_URL = MEDIA_URL
STATIC_URL = MEDIA_URL + ‘assets/’
SITE_ROOT = ‘/datashare/’
LOGIN_URL = ‘/datashare/accounts/login/’
FILE_SERVER_ROOT = ‘http://myseafile.com/seafhttp’
vi /shared/seafile/conf/ccnet.conf and edit the line into:
SERVICE_URL = http://myseafile.com/datashare
apache configuration file for the seafile_proxy_1 container to be placed in sites-available:
<VirtualHost *:80> ServerName myseafile.com ProxyPreserveHost On <Location /> ProxyPass http://seafile/ ProxyPassReverse http://seafile/ </Location> <Location /datashare/media> ProxyPass http://seafile/media ProxyPassReverse http://seafile/media </Location> </VirtualHost>
Do not forget to a2ensite your apache conf file within seafile_proxy_1 container.
Access http://myseafile.com/datashare and everything should be up and running.