services: nginx: image: nginx:latest ports: - "80:80" - "443:443" volumes: - ./static:/var/www/static # For static content delivery - ./nginx/conf.d:/etc/nginx/conf.d # Your sites conf files - ./nginx/nginx.conf:/etc/nginx/nginx.conf # Main NginX config file - ./certbot/www:/var/www/certbot - ./certbot/conf:/etc/letsencrypt # Stores certificates restart: unless-stopped depends_on: - certbot certbot: image: certbot/certbot volumes: - ./certbot/www:/var/www/certbot - ./certbot/conf:/etc/letsencrypt restart: unless-stopped