ONLYOFFICE / Docker-CommunityServer

Collaborative system for managing documents, projects, customer relations and emails in one place
MIT License
476 stars 177 forks source link

Docker install alonside existing apache server #74

Open joukeHijlkema opened 4 years ago

joukeHijlkema commented 4 years ago

Hi all,

I've spent the day trying to find out how to use the docker install alongside an existing apache and mysql server. If I use the info on https://helpcenter.onlyoffice.com/server/docker/community/docker-installation.aspx, changing the port for mysql with -p 3307:3306 and for onlyoffice using -p 90:80 I get errors about tables not existing:

docker logs for the onlyoffice container: dig: couldn't get address for 'resolver1.opendns.com': failure mysq check connection for onlyoffice-mysql-server mysqld is alive DB_IS_EXIST: onlyoffice DB_CHARACTER_SET_NAME: utf8 DB_COLLATION_NAME: utf8_general_ci DB_TABLES_COUNT: 170 change connections for default then /var/www/onlyoffice/WebStudio/web.connections.config change connections for teamlabsite then /var/www/onlyoffice/WebStudio/web.connections.config change connections for default then /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.Config change connections for default then /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config change connections for default then /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config change connections for default then /var/www/onlyoffice/Services/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config change connections for core then /var/www/onlyoffice/ApiSystem/Web.config ERROR 1146 (42S02) at line 224: Table 'onlyoffice.wiki_pages' doesn't exist ERROR 1146 (42S02) at line 78: Table 'onlyoffice.tenants_quota' doesn't exist ERROR 1146 (42S02) at line 31: Table 'onlyoffice.tenants_partners' doesn't exist ERROR 1146 (42S02) at line 40: Table 'onlyoffice.tenants_quota' doesn't exist ERROR 1146 (42S02) at line 89: Table 'onlyoffice.res_files' doesn't exist ERROR 1146 (42S02) at line 3: Table 'onlyoffice.res_files' doesn't exist onlyoffice ALL=(ALL) NOPASSWD: /usr/sbin/service Starting redis-server: redis-server. fix docker bug volume mapping for onlyoffice Starting monoserve... OK Stopping monoserve... OK Starting monoserve... OK Starting monoserve2... OK Stopping monoserve2... OK Starting monoserve2... OK Starting monoserveApiSystem... OK Stopping monoserveApiSystem... OK Starting monoserveApiSystem... OK Starting onlyofficeFeed... OK Starting onlyofficeIndex... OK Starting onlyofficeJabber... OK Starting onlyofficeMailAggregator... OK Starting onlyofficeMailWatchdog... OK Starting onlyofficeNotify... OK Starting onlyofficeBackup... OK Starting god... OK

docker logs for the mysql container: 2019-11-25 18:11:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started. 2019-11-25 18:11:42+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2019-11-25 18:11:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started. 2019-11-25T18:11:43.230518Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-11-25T18:11:43.232040Z 0 [Note] mysqld (mysqld 5.7.28) starting as process 1 ... 2019-11-25T18:11:43.235321Z 0 [Note] InnoDB: PUNCH HOLE support available 2019-11-25T18:11:43.235341Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-11-25T18:11:43.235346Z 0 [Note] InnoDB: Uses event mutexes 2019-11-25T18:11:43.235351Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2019-11-25T18:11:43.235356Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2019-11-25T18:11:43.235360Z 0 [Note] InnoDB: Using Linux native AIO 2019-11-25T18:11:43.235608Z 0 [Note] InnoDB: Number of pools: 1 2019-11-25T18:11:43.235712Z 0 [Note] InnoDB: Using CPU crc32 instructions 2019-11-25T18:11:43.237504Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2019-11-25T18:11:43.246136Z 0 [Note] InnoDB: Completed initialization of buffer pool 2019-11-25T18:11:43.248086Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2019-11-25T18:11:43.259818Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2019-11-25T18:11:43.311184Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2019-11-25T18:11:43.311275Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-11-25T18:11:43.429737Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-11-25T18:11:43.431702Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2019-11-25T18:11:43.431727Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2019-11-25T18:11:43.432282Z 0 [Note] InnoDB: Waiting for purge to start 2019-11-25T18:11:43.482504Z 0 [Note] InnoDB: 5.7.28 started; log sequence number 82970339 2019-11-25T18:11:43.482918Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2019-11-25T18:11:43.483153Z 0 [Note] Plugin 'FEDERATED' is disabled. 2019-11-25T18:11:43.540742Z 0 [Note] InnoDB: Buffer pool(s) load completed at 191125 18:11:43 2019-11-25T18:11:43.565945Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them. 2019-11-25T18:11:43.565966Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory. 2019-11-25T18:11:43.566621Z 0 [Warning] CA certificate ca.pem is self signed. 2019-11-25T18:11:43.566658Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory. 2019-11-25T18:11:43.567117Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2019-11-25T18:11:43.567151Z 0 [Note] IPv6 is available. 2019-11-25T18:11:43.567164Z 0 [Note] - '::' resolves to '::'; 2019-11-25T18:11:43.567185Z 0 [Note] Server socket created on IP: '::'. 2019-11-25T18:11:43.569824Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2019-11-25T18:11:43.831619Z 0 [Note] Event Scheduler: Loaded 0 events 2019-11-25T18:11:43.831807Z 0 [Note] mysqld: ready for connections. Version: '5.7.28' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL) 2019-11-25T18:12:29.627347Z 24 [Note] Aborted connection 24 to db: 'onlyoffice' user: 'onlyoffice_user' host: 'onlyoffice-community-server.onlyoffice' (Got an error reading communication packets) ... snip

And I can't seem to find a way to use the opensource-install.sh with different ports.

So the question is: Is this set-up possible and if yes PLEASE tell me how.

Thanks,

Jouke

Carazyda commented 4 years ago

Hello @joukeHijlkema Please try additional parameter for running community server container: -e MYSQL_SERVER_PORT=3307

rubo77 commented 4 years ago

I think it is not needed to change the mysql-port, since it is only used internally between those two docker-containers