ansible-edda/playbooks/roles/services/deploy/cloud/vars/main.yml

74 lines
3.3 KiB
YAML

---
services_deploy_pod:
wants:
- "nextcloud"
oneshot:
chown:
image: "docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }}"
before:
- "nextcloud"
podman_run_args:
- "-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html"
- "-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data"
- "-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external"
- "--user=0"
- "--entrypoint=\"/bin/bash\""
cmd_args:
- "-c \"chown -R www-data:www-data /var/www/html /media/external\""
containers:
cron:
image: "docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }}"
binds_to:
- "nextcloud"
podman_run_args:
- "-v ./.config/service/hosts:/etc/hosts:ro"
- "-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html"
- "-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data"
- "-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external"
cmd_args:
- "/cron.sh"
nextcloud:
image: "docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }}"
binds_to:
- "redis"
requires:
- "chown"
wants:
- "cron"
- "nginx"
podman_run_args:
- "-v ./.config/service/hosts:/etc/hosts:ro"
- "-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html"
- "-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data"
- "-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external"
- "-v ./.config/service/database.name:/run/secrets/database.name:ro"
- "-v ./.config/service/database.user:/run/secrets/database.user:ro"
- "-v ./.config/service/database.password:/run/secrets/database.password:ro"
- "-e POSTGRES_HOST=pod-database:5432"
- "-e POSTGRES_DB_FILE=/run/secrets/database.name"
- "-e POSTGRES_USER_FILE=/run/secrets/database.user"
- "-e POSTGRES_PASSWORD_FILE=/run/secrets/database.password"
- "-e REDIS_HOST=localhost"
- "-e NEXTCLOUD_TRUSTED_DOMAINS=\"{{ services[services_service_name].domain }}\""
- "-e OVERWRITEPROTOCOL=\"https\""
- "-e SMTP_HOST=\"{{ services[services_service_name].smtp.host }}\""
- "-e SMTP_SECURE=\"ssl\""
- "-e SMTP_PORT=465"
- "-e SMTP_AUTHTYPE=\"PLAIN\""
- "-e SMTP_NAME=\"{{ services[services_service_name].smtp.user }}\""
- "-e SMTP_PASSWORD=\"{{ services[services_service_name].smtp.password }}\""
- "-e MAIL_FROM_ADDRESS=\"cloud\""
- "-e MAIL_DOMAIN=\"{{ services[services_service_name].domain }}\""
nginx:
image: "docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}"
binds_to:
- "nextcloud"
podman_run_args:
- "-v ./.config/service/nginx.conf:/etc/nginx/nginx.conf:ro"
- "-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html"
- "-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data"
redis:
image: "docker.io/library/redis:{{ services_service_deploy_versions.redis }}"
podman_run_args:
- "-v %N---data:/data"