role_podman_nextcloud/templates/docker-compose.yml.j2
2025-12-03 23:22:08 -05:00

58 lines
1.5 KiB
Django/Jinja

version: '3.6'
services:
nextcloud:
image: nextcloud:stable-fpm
restart: always
ports:
- 9000:9000
env_file:
- .webserver.env
environment:
VIRTUAL_PROTO: "fastcgi"
VIRTUAL_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
VIRTUAL_ROOT: "/var/www/html/"
LETSENCRYPT_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
NEXTCLOUD_ADMIN_USER: "admin"
POSTGRES_DB: "nextcloud"
POSTGRES_USER: "postgres"
POSTGRES_HOST: "database"
NEXTCLOUD_TRUSTED_DOMAINS: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
hostname: webserver
networks:
default:
aliases:
- "test-eqit.lan"
volumes:
- ~/webroot:/var/www/html
database:
image: postgres:latest
restart: always
hostname: database
env_file:
- .db.env
environment:
POSTGRES_DB: "nextcloud"
networks:
default:
aliases:
"nextcloud-db.lan"
nginx-proxy:
restart: unless-stopped
ports:
- 8080:8080
- 4443:4443
image: nginxproxy/nginx-proxy:1.9-alpine
hostname: nginxproxy
environment:
HTTP_PORT: 8080
HTTPS_PORT: 4443
volumes:
- /run/user/1000/podman/podman.sock:/tmp/docker.sock:ro
- /home/nextcloud/nginx/certs:/etc/nginx/certs
- /home/nextcloud/nginx/challenges:/usr/share/nginx/html
- /home/nextcloud/nginx/vhost.d:/etc/nginx/vhost.d