Hi there,
I run the Nextcloud docker container as provided by the UCS App Store. Furthermore, I enabled the fulltextsearch app within Nextcloud which requires ElasticSearch. I configured ElasticSearch directly in UCS, outside the Nextcloud docker container as I did not want to break the original configuration of the docker container.
Creating the first index is a one-time task that I could handle by executing occ fulltextsearch:index. However, to keep the index up and running, occ fulltextsearch:live needs to be run. I tried:
/etc/systemd/system/nextcloud-fulltext-elasticsearch-worker.service
[Unit]
Description=Elasticsearch Worker for Nextcloud Fulltext Search
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/nextcloud
ExecStart=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:live
Nice=19
Restart=always
[Install]
WantedBy=multi-user.target
The I executed:
root@nextc-00667767:/# systemctl enable nextcloud-fulltext-elasticsearch-worker.service
root@nextc-00667767:/# systemctl start nextcloud-fulltext-elasticsearch-worker.service
System has not been booted with systemd as init system (PID 1). Can't operate.
As shown above, I failed to setup a service to be executed within the Docker container that invokes fulltextsearch:live. What is the best practice in this case?
Best regards,
Peter