--- services: nginx: container_name: nginx build: . restart: unless-stopped ports: - "80:80" - "443:443" volumes: - sites:/etc/nginx/conf.d/ - certs:/etc/letsencrypt/ - certbotroot:/var/www/certbot/:ro networks: - nginx volumes: sites: name: sites certs: name: certs certbotroot: name: certbotroot config: networks: nginx: name: nginx