Set up the SpaceAPI service docker container

This commit is contained in:
Stefan Haun 2024-11-02 15:40:18 +01:00
parent 136c2c8985
commit 04c6a6d586
2 changed files with 24 additions and 0 deletions

View file

@ -132,6 +132,23 @@
### Space API
- name: Setup the SpaceAPI Docker container
docker_container:
name: spaceapi
image: "{{ spaceapi_image }}"
pull: true
state: started
detach: yes
restart_policy: unless-stopped
ports:
- "0.0.0.0:{{ spaceapi_host_port }}:8080" # Must be reached by pottwal
# - "127.0.0.1:{{ spaceapi_host_port }}:8080"
env:
TZ: "{{ timezone }}"
MQTT_BROKER: "platon.n39.eu"
MQTT_TOPIC_STATUS: "{{ spaceapi_topic_status }}"
MQTT_TOPIC_LASTCHANGE: "{{ spaceapi_topic_lastchange }}"
tags:
- spaceapi
handlers:

View file

@ -2,3 +2,10 @@ server_admin: "admin+wittgenstein@netz39.de"
ansible_python_interpreter: /usr/bin/python3
gatekeeper_user: pi
data_dir: "/srv/data"
spaceapi_host_port: 8001
spaceapi_domain_name: spaceapi.n39.eu
spaceapi_image: netz39/spaceapi-service:0.1.0
spaceapi_topic_status: "Netz39/SpaceAPI/isOpen"
spaceapi_topic_lastchange: "Netz39/SpaceAPI/lastchange"