36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
# Phase 0 : outil en ligne de commande, lancé à la demande :
|
|
# docker compose run --rm confsync check
|
|
# docker compose run --rm confsync diff
|
|
# docker compose run --rm confsync export -o /data/ref.yaml
|
|
# docker compose run --rm confsync apply # dry-run
|
|
# docker compose run --rm confsync apply -confirm # application (confirmation SDN interactive)
|
|
services:
|
|
confsync:
|
|
build: .
|
|
image: pve-confsync:dev
|
|
container_name: pve-confsync
|
|
environment:
|
|
TZ: ${TZ:-Europe/Paris}
|
|
PVE_SITE_B_SECRET: ${PVE_SITE_B_SECRET:-} # secrets par variable (voir token_secret_env)
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
volumes:
|
|
- ./confsync.yaml:/config/confsync.yaml:ro
|
|
- confsync-data:/data # exports YAML, plus tard SQLite (phase 1)
|
|
secrets:
|
|
- pve_ref
|
|
- pve_site_a
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
# Secrets des tokens API sous forme de fichiers (chmod 600), montés dans /run/secrets/<nom>
|
|
secrets:
|
|
pve_ref:
|
|
file: ./secrets/pve_ref
|
|
pve_site_a:
|
|
file: ./secrets/pve_site_a
|
|
|
|
volumes:
|
|
confsync-data:
|