mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2026-11-29 04:14:58 +01:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
volumes:
|
|
nginx_conf:
|
|
nginx_vhost:
|
|
nginx_certs:
|
|
nginx_htpasswd:
|
|
nginx_errors:
|
|
|
|
networks:
|
|
proxy:
|
|
private:
|
|
internal: true
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx
|
|
container_name: nginx
|
|
networks:
|
|
- proxy
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./network_internal.conf:/etc/nginx/network_internal.conf:ro
|
|
- nginx_conf:/etc/nginx/conf.d:ro
|
|
- nginx_vhost:/etc/nginx/vhost.d:ro
|
|
- nginx_htpasswd:/etc/nginx/htpasswd:ro
|
|
- nginx_certs:/etc/nginx/certs:ro
|
|
- nginx_errors:/usr/share/nginx/html/errors:ro
|
|
labels:
|
|
- com.github.nginx-proxy.nginx-proxy.nginx
|
|
|
|
dockergen:
|
|
image: nginxproxy/nginx-proxy:dockergen
|
|
container_name: dockergen
|
|
networks:
|
|
- private
|
|
environment:
|
|
# nginx-proxy environment variable (HTTP_PORT etc.) must be set on the docker-gen container (not the nginx container)
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- nginx_conf:/etc/nginx/conf.d # not read-only because docker-gen needs to write the generated config
|
|
- nginx_vhost:/etc/nginx/vhost.d:ro
|
|
- nginx_htpasswd:/etc/nginx/htpasswd:ro
|
|
- nginx_certs:/etc/nginx/certs:ro
|
|
- nginx_errors:/usr/share/nginx/html/errors:ro
|
|
|
|
whoami:
|
|
image: jwilder/whoami
|
|
container_name: whoami
|
|
networks:
|
|
- proxy
|
|
environment:
|
|
- VIRTUAL_HOST=whoami.example
|