role_podman_nextcloud/templates/docker-compose.yml.j2
2025-12-07 00:29:59 -05:00

54 lines
1.3 KiB
Django/Jinja

services:
app:
image: nextcloud:stable-fpm
hostname: app
restart: always
ports:
- "9000:9000"
volumes:
- /home/{{ user.name }}/webroot:/var/www/html
- /home/{{ user.name }}/nginx/vhost.d:/etc/nginx/vhost.d
environment:
- VIRTUAL_HOST="{{ inventory_hostname | default('ansible_undefined_host') }}"
- NEXTCLOUD_ADMIN_USER="admin"
- POSTGRES_DATABASE=nextcloud
- POSTGRES_HOST=db:5432
- REDIS_HOST=redis
- NEXTCLOUD_TRUSTED_DOMAINS="{{ inventory_hostname | default('ansible_undefined_host') }}"
env_file:
- .db.env
networks:
default:
aliases:
- "nextcloud.local"
nginx-proxy:
image: nginxproxy/nginx-proxy:latest
ports:
- 8080:80 # change to 80:80 when the shop is ready to go live
- 4443:443 # change to 80:80 when the shop is ready to go live
networks:
default:
volumes:
- ~/nginx/certs:/etc/nginx/certs
- ~/nginx/html:/usr/share/nginx/html
- /run/user/{{ getent_passwd[user.name][2] }}/podman/podman.sock:/tmp/docker.sock:ro
db:
image: postgres:alpine
hostname: db
restart: always
volumes:
- db:/var/lib/postgresql/data:Z
env_file:
- .db.env
redis:
image: redis:alpine
hostname: redis
restart: always
volumes:
db: