services: app: image: nextcloud:stable-fpm hostname: app restart: always ports: - "9000:9000" volumes: - /home/{{ user.name }}/webroot:/var/www/public environment: - VIRTUAL_HOST={{ inventory_hostname | default('ansible_undefined_host') }} - VIRTUAL_PROTO=fastcgi - 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: build: ./nginx 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:z,ro - ~/nginx/conf.d:/etc/nginx/conf.d:z,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: