From 9ba41de06d500be2833855bef01d7a9ccc07648f Mon Sep 17 00:00:00 2001 From: Malte Date: Sun, 15 Dec 2024 16:14:01 +0100 Subject: [PATCH] init --- forumbot/init.sls | 12 ++++++++++++ pillar.example | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 forumbot/init.sls create mode 100644 pillar.example diff --git a/forumbot/init.sls b/forumbot/init.sls new file mode 100644 index 0000000..04cf102 --- /dev/null +++ b/forumbot/init.sls @@ -0,0 +1,12 @@ +forumbot docker_container.running: + docker_container.running: + - name: forumbot + - image: {{ salt['pillar.get']('postgres:image:path', 'docker.io/flipdot/forumbot') }}:{{ salt['pillar.get']('postgres:image:version', 'latest') }} + - container_name: forumbot + - environment: + - DISCOURSE_API_KEY: {{ salt['pillar.get']('forumbot:discourse_api_key') }} + - DISCOURSE_USERNAME: {{ salt['pillar.get']('forumbot:discourse_username') }} + - SENTRY_DSN: {{ salt['pillar.get']('forumbot:sentry_dsn') }} + - restart: always + - healthcheck: + test: ["CMD", "python", "/app/src/app.py", "--test_connection"] diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000..0ce3d02 --- /dev/null +++ b/pillar.example @@ -0,0 +1,6 @@ +forumbot: + image: + path: docker.io/flipdot/forumbot + version: latest + discourse_api_key: 1234567890 + sentry_dsn: https://sentry.io/flipdot/forumbot