version: '3' services: nginx: # image: nginx:1.21-alpine build: context: nginx dockerfile: Dockerfile restart: always #entrypoint: /bin/sh container_name: nginx ports: - "80:80" - "443:443" - "8448:8448" environment: - MODULES=${MODULES} env_file: - ./env.production volumes: - ./nginx/etc/includes:/etc/nginx/includes:ro - ./nginx/etc/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/default.conf:/etc/nginx/templates/default.conf.template:ro - ./nginx/www.conf:/etc/nginx/templates/www.conf.template:ro - ./html:/var/www/html:ro - ./data/nginx/certbot/www:/var/www/certbot:ro - ./data/nginx/certbot/conf:/etc/letsencrypt:rw - ./sites:/etc/nginx/sites-enabled:ro - /home:/home:ro certbot: image: certbot/certbot container_name: certbot env_file: - ./env.production volumes: - ./data/nginx/certbot/conf:/etc/letsencrypt - ./data/nginx/certbot/www:/var/www/certbot