storage

Ansible role that provisions my storage server.

989 BJ2
restic-server-compose.yml.j2
989 B43 lines • plaintext
1# Restic Backup Server Docker Compose Configuration
2# Generated by Ansible - DO NOT EDIT MANUALLY
3
4
5services:
6  restic-server:
7    image: {{ restic_image }}:{{ restic_version }}
8    container_name: restic-server
9    restart: unless-stopped
10    
11    # Environment Configuration
12    
13    # Port Mapping
14    ports:
15      - "{{ restic_backup_host_port }}:{{ restic_backup_port }}"
16    
17    # Volume Mounts
18    volumes:
19      - {{ restic_backup_data_dir }}:/data
20    
21    
22    # Network
23    networks:
24      - {{ storage_docker_network }}
25    
26    # Environment variables for configuration
27    environment:
28      DATA_DIRECTORY: /data
29      PASSWORD_FILE: /data/.htpasswd
30      OPTIONS: >-
31        --listen 0.0.0.0:{{ restic_backup_port }}
32        --append-only=false
33        --private-repos=true
34{% if restic_backup_username is defined and restic_backup_username != "" %}
35        --auth
36{% else %}
37        --no-auth
38{% endif %}
39    
40
41networks:
42  {{ storage_docker_network }}:
43    external: true