version: '2' services: nextcloud: image: nextcloud:20 ports: - 8092:80 volumes: - /srv/nextcloud:/var/www/html restart: always links: - db db: image: postgres restart: always volumes: - db:/var/lib/postgresql/data environment: - POSTGRES_DB=nextcloud - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=nextcloud123 app: image: nextcloud:20-fpm-alpine restart: always volumes: - nextcloud:/var/www/html links: - db depends_on: - db web: image: nginx:alpine restart: always ports: #- 8090:80 - 8090:80 links: - app volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - nextcloud:/var/www/html:ro volumes: db: nextcloud: