pretalx-docker-formula/pretalx-docker/init.sls
2024-07-30 20:48:43 +02:00

28 lines
932 B
Text

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"