Last active
April 3, 2019 06:59
-
-
Save t-book/f666da154b780d9d6699b4f0b5c8781d to your computer and use it in GitHub Desktop.
a systemd service file for geonode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- Usage --- | |
sudo vim /etc/systemd/system/geonode-celery.service | |
sudo systemctl enable geonode-celery # Enables the service (on boot) | |
sudo systemctl restart geonode-celery | |
sudo systemctl start geonode-celery | |
sudo systemctl stop geonode-celery | |
sudo systemctl status geonode-celery | |
sudo systemctl daemon-reload | |
sudo systemd-analyze verify geonode-celery | |
# --- Path to virualenv --- | |
/home/vagrant/Envs/geonode/bin/celery | |
# --- File lives in --- | |
/etc/systemd/system/geonode-celery.service | |
# --- maybe better kill with --- | |
ps -ef | grep 'celery' | grep -v grep | awk '{print $2}' | xargs kill | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=GeoNode Celery Service | |
After=network.target | |
[Service] | |
User=www-data | |
Group=www-data | |
Restart=no | |
WorkingDirectory=/home/geonode/my_geonode/ | |
ExecStart=/bin/sh -c 'DJANGO_SETTINGS_MODULE=my_geonode.local_settings \ | |
/home/vagrant/Envs/geonode/bin/celery worker \ | |
--app=geonode.celery_app:app \ | |
--queues default,geonode,cleanup,update \ | |
--logfile /var/log/celery/geonode-celery.log \ | |
--beat \ | |
--loglevel debug' | |
ExecStop=/bin/sh -c '/home/vagrant/Envs/geonode/bin/celery stop' | |
[Install] | |
WantedBy=multi-user.target | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment