docker-compose.yml
services:
seafile_db:
image: mariadb:10.11
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=db_dev # Required, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./seafile-mysql/db:/var/lib/mysql # Required, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.6.18
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:11.0-latest
container_name: seafile
ports:
- "8090:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- ./seafile-data:/shared # Required, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=seafile_db
- DB_ROOT_PASSWD=db_dev # Required, the value should be root's password of MySQL service.
- TIME_ZONE=Asia/Seoul # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=me@example.com # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=asecret # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=sea.abc.com # Specifies your host name if https is enabled.
depends_on:
- seafile_db
- memcached
networks:
- seafile-net
- default
networks:
default:
external: true
name: npm
seafile-net:
driver: bridge
internal: true
위와 같이 하면 Oracle A1에 seafile을 설치할 수 있다. 그런데 이게 끝이 아니다.
NPM(Nginx Proxy Manager)에서 sea.abc.com 관련 설정을 해주고 sea.abc.com에 접속하여 id, password를 입력하면 CSRF verification failed 에러가 뜬다.
seafile docker container 내 conf/seahub_settings.py 에 아래 구문을 추가하고 docker container restart 해준다.
CSRF_TRUSTED_ORIGINS = ["https://sea.abc.com"]
위와 같이 하면 sea.abc.com에 접속하여 로그인할 수 있다.
sea.abc.com에 로그인한 후 한 가지 더 변경해야 한다.
System Admin -> Settings로 들어가서
SERVICE_URL과 FILE_SERVER_ROOT 안에 있는 http 를 https로 수정한다.