DB directory has user 70 (docker).

Optional install geoip container.
This commit is contained in:
Laur Ivan 2022-09-17 18:47:53 +02:00
parent 025b7f4dd8
commit b09f380957
3 changed files with 15 additions and 1 deletions

View File

@ -61,6 +61,7 @@ authentik_volume_db: "{{ authentik_volume_base }}/db"
authentik_volume_redis: "{{ authentik_volume_base }}/redis" authentik_volume_redis: "{{ authentik_volume_base }}/redis"
# geoip credentials # geoip credentials
authentik_geoip_container: true
geoip_account_id: geoip_account_id:
geoip_license_key: geoip_license_key:
geoip_update_edition_ids: "GeoLite2-City GeoLite2-Country" geoip_update_edition_ids: "GeoLite2-City GeoLite2-Country"

View File

@ -11,7 +11,6 @@
- "{{ authentik_volume_certs }}" - "{{ authentik_volume_certs }}"
- "{{ authentik_volume_geoip }}" - "{{ authentik_volume_geoip }}"
- "{{ authentik_volume_templates }}" - "{{ authentik_volume_templates }}"
- "{{ authentik_volume_db }}"
- "{{ authentik_volume_config }}" - "{{ authentik_volume_config }}"
- "{{ authentik_volume_redis }}" - "{{ authentik_volume_redis }}"
- "~/authentik" - "~/authentik"
@ -19,6 +18,18 @@
- configuration - configuration
become: false become: false
- name: Set up the database directory.
file:
state: directory
path: "{{ item }}"
mode: 0755
owner: 70
with_items:
- "{{ authentik_volume_db }}"
tags:
- configuration
become: false
- name: Copy Authentik docker-compose template. - name: Copy Authentik docker-compose template.
ansible.builtin.template: ansible.builtin.template:
src: templates/docker-compose.yml.j2 src: templates/docker-compose.yml.j2

View File

@ -75,9 +75,11 @@ services:
- {{ authentik_volume_geoip }}:/geoip - {{ authentik_volume_geoip }}:/geoip
env_file: env_file:
- {{ authentik_volume_config }}/env.authentik.conf - {{ authentik_volume_config }}/env.authentik.conf
{% if authentik_geoip_container %}
geoipupdate: geoipupdate:
image: "maxmindinc/geoipupdate:latest" image: "maxmindinc/geoipupdate:latest"
volumes: volumes:
- "{{ authentik_volume_geoip }}:/usr/share/GeoIP" - "{{ authentik_volume_geoip }}:/usr/share/GeoIP"
env_file: env_file:
- {{ authentik_volume_config }}/env.authentik.conf - {{ authentik_volume_config }}/env.authentik.conf
{% endif %}