You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
638B

  1. [Unit]
  2. Description=Openproject in a Unicorn
  3. Requires=network.target
  4. #Requires=nginx.service
  5. Before=nginx.service
  6. [Service]
  7. Type=simple
  8. {% if unicorn.socket == "tcp" %}
  9. ExecStart=/bin/sh -l -c "bundle exec unicorn --port {{unicorn.port}} --host {{unicorn.host}} --env production"
  10. {% elif unicorn.socket == "unix" %}
  11. ExecStart=/bin/sh -l -c "bundle exec unicorn --listen {{unicorn.path}} --env production"
  12. {% endif %}
  13. PrivateTmp=yes
  14. User={{openproject_user}}
  15. Group={{openproject_group}}
  16. WorkingDirectory={{openproject_path}}/openproject
  17. Restart=always
  18. Environment="SECRET_KEY_BASE={{secret_key_base}}"
  19. [Install]
  20. WantedBy=multiuser.target