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.
26 lines
890 B
26 lines
890 B
---
|
|
- 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 &
|
|
|