39 lines
1 KiB
YAML
39 lines
1 KiB
YAML
|
---
|
||
|
- name: Create archivebox volume
|
||
|
become: true
|
||
|
community.docker.docker_volume:
|
||
|
name: archivebox
|
||
|
- name: Create data dir
|
||
|
become: true
|
||
|
ansible.builtin.file:
|
||
|
path: /mnt/hdd/archivebox-data
|
||
|
state: directory
|
||
|
mode: "1700"
|
||
|
owner: root
|
||
|
- name: Create nested data dir
|
||
|
become: true
|
||
|
ansible.builtin.file:
|
||
|
path: /mnt/hdd/archivebox-data/_data
|
||
|
state: directory
|
||
|
mode: "1700"
|
||
|
owner: "911"
|
||
|
- name: Run archivebox
|
||
|
become: true
|
||
|
community.docker.docker_container:
|
||
|
name: archivebox-1
|
||
|
image: archivebox/archivebox:0.7.2
|
||
|
env:
|
||
|
PUBLIC_INDEX: "{{ public_index | string }}"
|
||
|
PUBLIC_SNAPSHOTS: "{{ public_snapshots | string }}"
|
||
|
SAVE_ARCHIVE_DOT_ORG: "{{ save_archive_dot_org | string }}"
|
||
|
CSRF_TRUSTED_ORIGINS: "{{ csrf_trusted_origins }}"
|
||
|
ALLOWED_HOSTS: "{{ allowed_hosts }}"
|
||
|
PUID: "911"
|
||
|
PGID: "911"
|
||
|
networks:
|
||
|
- name: haproxy
|
||
|
volumes:
|
||
|
- archivebox:/data
|
||
|
- /mnt/hdd/archivebox-data/_data:/data/archive
|
||
|
restart_policy: unless-stopped
|