version: '3.4' services: nginx: build: context: . dockerfile: Dockerfile ports: - '80:80' - '443:443' restart: always volumes: - ./nginx/conf/:/etc/nginx/conf.d/:ro - ./certbot/www:/var/www/certbot/:ro - ./certbot/conf/:/etc/nginx/ssl/:ro certbot: image: certbot/certbot:latest volumes: - ./certbot/www/:/var/www/certbot/:rw - ./certbot/conf/:/etc/letsencrypt/:rw