From f4d2a3ac3ef03a5edce417318ddef7aedfcc34be Mon Sep 17 00:00:00 2001 From: Elouin Date: Tue, 30 Jul 2024 20:48:43 +0200 Subject: [PATCH] init --- README.md | 0 pillar.example | 0 pretalx-docker/init.sls | 28 ++++++++++++++++++++++++++ pretalx-docker/pretalx.cfg.jinja | 34 ++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 README.md create mode 100644 pillar.example create mode 100644 pretalx-docker/init.sls create mode 100644 pretalx-docker/pretalx.cfg.jinja diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000..e69de29 diff --git a/pretalx-docker/init.sls b/pretalx-docker/init.sls new file mode 100644 index 0000000..9bcb755 --- /dev/null +++ b/pretalx-docker/init.sls @@ -0,0 +1,28 @@ +pretalx-data-directory-exists: + file.directory: + - name: /opt/pretalx + - makedirs: True + +pretalx-config-file-is-present: + file.managed: + - name: /opt/pretalx/pretalx.cfg + - source: salt://pretalx/pretalx.cfg.jinja + - template: jinja + +pretalx-docker-container-running: + docker_container.running: + - name: pretalx + - image: {{ salt['pillar.get']('forgejo:image:path', 'docker.io/pretalx/standalone:latest') }}:{{ salt['pillar.get']('forgejo:image:version', 'v2024.1.0') }} + - container_name: pretalx + - environment: + - PRETALX_FILESYSTEM_MEDIA=/public/media + - PRETALX_FILESYSTEM_STATIC=/public/static + - restart: always + - networks: + - bridge + - binds: + - /opt/pretalx/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro + - pretalx-data:/data + - pretalx-public:/public + - port_bindings: + - "{{ salt['pillar.get']('forgejo:container_web_port', "127.0.0.1:3000") }}:80" diff --git a/pretalx-docker/pretalx.cfg.jinja b/pretalx-docker/pretalx.cfg.jinja new file mode 100644 index 0000000..41746de --- /dev/null +++ b/pretalx-docker/pretalx.cfg.jinja @@ -0,0 +1,34 @@ +# This is an example pretalx configuration file. +# Documentation: https://docs.pretalx.org/administrator/configure.html + +[filesystem] +data = /var/pretalx/data +static = /var/pretalx/static + +[site] +debug = False +url = https://pretalx.mydomain.com + +[database] +# For MySQL, replace with "mysql" +backend = postgresql +name = pretalx +user = pretalx +# For MySQL, enter the user password. For PostgreSQL on the same host, +# we don't need one because we can use peer authentification if our +# PostgreSQL user matches our unix user. +password = Change this in production or you're going to have a bad time +# For MySQL, you can use a local socket, e.g. /var/run/mysqld/mysqld.sock +# For a remote host, supply an IP address +# For local postgres authentication, you can leave the host empty +host = localhost +port = 5432 + +[mail] +from = admin@localhost +host = localhost +port = 25 +user = admin +password = Change this in production or you're going to have a bad time +tls = False +ssl = True