summaryrefslogtreecommitdiff
path: root/ansible/gunicorn.service.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/gunicorn.service.j2')
-rw-r--r--ansible/gunicorn.service.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/ansible/gunicorn.service.j2 b/ansible/gunicorn.service.j2
new file mode 100644
index 0000000..fe9c69c
--- /dev/null
+++ b/ansible/gunicorn.service.j2
@@ -0,0 +1,13 @@
+[Unit]
+Description=gunicorn daemon
+After=network.target
+
+[Service]
+User=ec2-user
+Group=nginx
+WorkingDirectory=/opt/image_processor
+ExecStart=/opt/image_processor/venv/bin/gunicorn --workers 3 --bind unix:{{ app_directory }}/myapp.sock -m 007 wsgi:app
+
+[Install]
+WantedBy=multi-user.target
+