version: '3' services: nginx: image: nginx:1.22 container_name: nginx ports: - '80:80' - '443:443' restart: always volumes: - '/var/run/docker.sock:/tmp/docker.sock:ro' - './configs:/etc/nginx/conf.d' - './certs:/etc/nginx/certs' - './vhost:/etc/nginx/vhost.d' - './html:/usr/share/nginx/html' dockergen: image: 'jwilder/docker-gen:0.9' container_name: dockergen restart: always command: >- -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf volumes: - '/var/run/docker.sock:/tmp/docker.sock:ro' - './configs/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl' - './configs:/etc/nginx/conf.d' - './certs:/etc/nginx/certs' - './vhost:/etc/nginx/vhost.d' - './html:/usr/share/nginx/html' nginx-proxy-acme: restart: always image: nginxproxy/acme-companion:2.2 container_name: nginx-proxy-acme volumes: - '/var/run/docker.sock:/var/run/docker.sock:ro' - './acme:/etc/acme.sh' - './configs:/etc/nginx/conf.d' - './certs:/etc/nginx/certs' - './vhost:/etc/nginx/vhost.d' - './html:/usr/share/nginx/html' environment: - DEFAULT_EMAIL=YOUR_EMAIL - NGINX_PROXY_CONTAINER=nginx - NGINX_DOCKER_GEN_CONTAINER=dockergen v2ray: image: v2fly/v2fly-core:v4.45.2 container_name: v2ray restart: always environment: - v2ray.vmess.aead.forced=false - VIRTUAL_HOST=YOUR_DOMAIN - LETSENCRYPT_HOST=YOUR_DOMAIN - VIRTUAL_PORT=1310 volumes: - './v2ray/config:/etc/v2ray/'