version: "2" services: nginx: restart: always image: nginxproxy/nginx-proxy:latest container_name: nginx-proxy ports: - "80:80" - "443:443" volumes: - "/etc/nginx/vhost.d" - "/usr/share/nginx/html" - "/var/run/docker.sock:/tmp/docker.sock:ro" - "$CERTS_DIR:/etc/nginx/certs:ro" - "$NGINX_CONF_DIR:/etc/nginx/conf.d" acme-companion: restart: always image: nginxproxy/acme-companion:latest container_name: acme-companion volumes_from: - nginx volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - "$CERTS_DIR:/etc/nginx/certs:rw" - "$ACME_SH_DIR:/etc/acme.sh" environment: - NGINX_DOCKER_GEN_CONTAINER=nginx-gen depends_on: - nginx networks: - default networks: default: external: name: $SERVER_DOCKER_NETWORKNAME