Update frontend script.
Always restart reverse proxy
This commit is contained in:
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
```bash
|
||||
ansible-playbook -i inventory frontend.yaml
|
||||
```
|
||||
@@ -37,12 +37,7 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
|
||||
# - name: Install Docker
|
||||
# ansible.builtin.include_tasks:
|
||||
# file: tasks/install_docker.yaml
|
||||
|
||||
- name: Copy referse proxy configuration to host
|
||||
- name: Copy reverse proxy configuration to host
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: apptabulous/reverseproxy
|
||||
@@ -52,6 +47,7 @@
|
||||
community.docker.docker_container:
|
||||
name: reverse_proxy
|
||||
image: nginx:mainline-alpine-slim
|
||||
restart_policy: always
|
||||
volumes:
|
||||
- /etc/reverseproxy/conf.d:/etc/nginx/conf.d
|
||||
- /etc/letsencrypt:/etc/letsencrypt
|
||||
@@ -79,4 +75,3 @@
|
||||
ports:
|
||||
- "3000:3000"
|
||||
state: started
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[kiosk]
|
||||
kiosk@kiosk.localdomain
|
||||
kiosk@kiosk.local
|
||||
|
||||
[frontend]
|
||||
rpi4-2.local
|
||||
35
kiosk.yaml
35
kiosk.yaml
@@ -5,6 +5,16 @@
|
||||
vars:
|
||||
username: kiosk
|
||||
|
||||
docker_add_repo: true
|
||||
docker_users:
|
||||
- "{{ username }}"
|
||||
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.docker
|
||||
become: true
|
||||
|
||||
|
||||
tasks:
|
||||
# - name: Ensure raspi-config is up to date
|
||||
# become: true
|
||||
@@ -79,6 +89,12 @@
|
||||
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
|
||||
chromium-browser --disable-infobars --kiosk ${WEBSITE:=https://bit.ly/shelford_kiosk}
|
||||
|
||||
- name: Configure openbox-session
|
||||
ansible.builtin.blockinfile:
|
||||
path: /home/{{ username }}/.xinitrc
|
||||
create: true
|
||||
line: "exec openbox-session"
|
||||
|
||||
- name: Start window manager
|
||||
ansible.builtin.lineinfile:
|
||||
path: /home/{{ username }}/.bash_profile
|
||||
@@ -92,10 +108,6 @@
|
||||
hour: "0,2,4,6,8,10,12,14,16,18,20,22"
|
||||
job: "DISPLAY=:0.0 xdotool key ctrl+r"
|
||||
|
||||
- name: Install Docker
|
||||
ansible.builtin.include_tasks:
|
||||
file: tasks/install_docker.yaml
|
||||
|
||||
- name: Create kiosk config directory
|
||||
ansible.builtin.file:
|
||||
path: /home/{{ username }}/kiosk
|
||||
@@ -130,19 +142,14 @@
|
||||
done
|
||||
|
||||
|
||||
# NOTE: This fails first time, but works after a manual pull from the target
|
||||
# NOTE: get the error -> 'Connection aborted.', PermissionError(13, 'Permission denied')
|
||||
- name: Install kiosk admin console
|
||||
community.docker.docker_compose:
|
||||
project_name: kiosk
|
||||
pull: true
|
||||
restarted: true
|
||||
definition:
|
||||
kiosk:
|
||||
- name: Start admin console container
|
||||
community.docker.docker_container:
|
||||
name: website
|
||||
image: hub.apptabulous.co.uk/apptabulous/kiosk:latest
|
||||
restart: "always"
|
||||
restart_policy: always
|
||||
ports:
|
||||
- "80:3000"
|
||||
volumes:
|
||||
- "/home/{{ username }}/kiosk:/app/kiosk"
|
||||
- "/home/{{ username }}/commands:/app/commands"
|
||||
state: started
|
||||
|
||||
Reference in New Issue
Block a user