Browse Source

deployment

Francois Deppierraz 5 months ago
parent
commit
0ffbe33deb
3 changed files with 22 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 10 0
      Makefile
  3. 11 0
      cotisations.service

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+env.sh

+ 10 - 0
Makefile

@@ -0,0 +1,10 @@
+deploy:
+	scp cotisations.py root@odoo.fixme.ch:/usr/local/bin/cotisations.py
+	scp cotisations.service root@odoo.fixme.ch:/etc/systemd/system/cotisations.service
+
+	ssh root@odoo.fixme.ch systemctl daemon-reload
+	ssh root@odoo.fixme.ch systemctl enable cotisations.service
+	ssh root@odoo.fixme.ch systemctl restart cotisations.service
+
+log:
+	ssh root@odoo.fixme.ch journalctl -u cotisations.service -f

+ 11 - 0
cotisations.service

@@ -0,0 +1,11 @@
+[Service]
+ExecStart=/usr/local/bin/cotisations.py
+WorkingDirectory=/tmp
+User=daemon
+Group=daemon
+
+# Environment variables are manually stored in
+# /etc/systemd/system/cotisations.service.d/env.conf
+
+[Install]
+WantedBy=default.target