2024-11-02 19:04:43 +05:00
|
|
|
---
|
|
|
|
- name: Create archivebox volume
|
|
|
|
become: true
|
|
|
|
community.docker.docker_volume:
|
|
|
|
name: archivebox
|
|
|
|
- name: Create data dir
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
2024-11-19 17:26:34 +05:00
|
|
|
path: "{{ archive_dir }}"
|
2024-11-02 19:04:43 +05:00
|
|
|
state: directory
|
|
|
|
mode: "1700"
|
|
|
|
owner: root
|
|
|
|
- name: Create nested data dir
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
2024-11-19 17:26:34 +05:00
|
|
|
path: "{{ archive_dir }}/_data"
|
2024-11-02 19:04:43 +05:00
|
|
|
state: directory
|
|
|
|
mode: "1700"
|
2024-11-19 17:26:34 +05:00
|
|
|
owner: "{{ uid | string }}"
|
2024-11-02 19:04:43 +05:00
|
|
|
- name: Run archivebox
|
|
|
|
become: true
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: archivebox-1
|
2024-11-19 17:26:34 +05:00
|
|
|
image: archivebox/archivebox:{{ tag }}
|
2024-11-02 19:04:43 +05:00
|
|
|
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 }}"
|
2024-11-19 17:26:34 +05:00
|
|
|
PUID: "{{ uid | string }}"
|
|
|
|
PGID: "{{ gid | string }}"
|
2024-11-02 19:04:43 +05:00
|
|
|
networks:
|
|
|
|
- name: haproxy
|
|
|
|
volumes:
|
2024-11-19 17:26:34 +05:00
|
|
|
- "archivebox:/data"
|
|
|
|
- "{{ archive_dir }}/_data:/data/archive"
|
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
2024-11-02 19:04:43 +05:00
|
|
|
restart_policy: unless-stopped
|