onlyoffice를 컨테이너 기반에서 설치하기
MSoffice를 대체할 수 있는 offic중에 onlyoffice가 있어서 한번 설치해봤습니다.
- Onlyoffice용 데이터 디렉토리 생성
$ mkdir /data/office/CommunityServer/{logs,data,lib,db} $ mkdir /data/office/ControlPanel/{logs,data,lib,db}
- onlyoffice용 DB구성 저는 기존에 실행중인 DB용 컨테이너가 있어서 기존 DB컨테이너에 DB인스턴스와 계정만 추가할께요
mysql> CREATE USER 'onlyoffice_user'@'localhost' IDENTIFIED BY 'onlyoffice_pass'; mysql> CREATE USER 'mail_admin'@'localhost' IDENTIFIED BY 'Isadmin123'; mysql> GRANT ALL PRIVILEGES ON * . * TO 'onlyoffice_user'@'%' IDENTIFIED BY 'onlyoffice_pass'; mysql> GRANT ALL PRIVILEGES ON * . * TO 'mail_admin'@'%' IDENTIFIED BY 'Isadmin123'; mysql> FLUSH PRIVILEGES;
- Control Panel 띄우기
$ docker run -d --net=test --restart=always --dns 219.250.36.130 -d \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /data/office/CommunityServer/data:/app/onlyoffice/CommunityServer/data \ -v /data/office/ControlPanel/data:/var/www/onlyoffice-controlpanel/Data \ -v /data/office/ControlPanel/logs:/var/log/onlyoffice-controlpanel \ --name office_panel onlyoffice/controlpanel
- 커뮤니티용 onlyoffice 서버 Container 띄우기
$ docker run -d --net=test--restart=always --dns 219.250.36.130 -p 80:80 -p 443:443 -p 5222:5222 \ -e MYSQL_SERVER_ROOT_PASSWORD=dbpass \ -e MYSQL_SERVER_DB_NAME=onlyoffice \ -e MYSQL_SERVER_HOST=db \ -e MYSQL_SERVER_USER=onlyoffice_user \ -e MYSQL_SERVER_PASS='onlyoffice_pass' \ -e CONTROL_PANEL_PORT_80_TCP=80 \ -e CONTROL_PANEL_PORT_80_TCP_ADDR=office_panel \ -v /data/office/CommunityServer/letsencrypt:/etc/letsencrypt \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ -v /data/office/CommunityServer/data:/var/www/onlyoffice/Data \ -v /data/office/CommunityServer/logs:/var/log/onlyoffice \ -v /data/office/DocumentServer/data:/var/www/onlyoffice/DocumentServerData \ --name office onlyoffice/communityserver
- 브라우져에서 접속하기 http://{{서버IP}}
Reference
No Comments