updated routes.txt, ansible script

This commit is contained in:
2023-03-09 16:32:00 +01:00
parent dee81a1a16
commit 726d4bdadf
5 changed files with 189 additions and 170 deletions
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
ansible-playbook -i inventory.ini deploy.yaml
+26
View File
@@ -0,0 +1,26 @@
---
- name: deploy gtfs application
hosts: sgeboers.nl
remote_user: webapps
tasks:
- name: make directories
ansible.builtin.git:
repo: https://git.sgeboers.nl/sgeboers/gtfs.git
dest: ~/gtfs/code
clone: yes
force: yes
- name: install virtualenv
ansible.builtin.pip:
name: virtualenv
executable: pip3
- name: install correct packages
ansible.builtin.pip:
requirements: ~/gtfs/code/requirements.txt
virtualenv: ~/gtfs/env
- name: stop old script
ansible.builtin.shell:
cmd: kill $(ps aux | grep "bokeh serve" | grep -v grep | awk '{print $2}') || true
- name: start script
ansible.builtin.shell:
cmd: . ~/gtfs/env/bin/activate; cd ~/gtfs/code; nohup bokeh serve main.py --allow-websocket-origin=sgeboers.nl:5006 --allow-websocket-origin=gtfs.sgeboers.nl &
+1
View File
@@ -0,0 +1 @@
sgeboers.nl