2018-12-07 11:57:05 +00:00
|
|
|
version: '2'
|
|
|
|
services:
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
restart: always
|
|
|
|
image: nginx
|
|
|
|
container_name: nginx
|
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
volumes:
|
2019-01-29 05:54:16 +00:00
|
|
|
- /etc/nginx/conf.d:/etc/nginx/conf.d
|
|
|
|
- /etc/nginx/vhost.d:/etc/nginx/vhost.d
|
|
|
|
- /usr/share/nginx/html:/usr/share/nginx/html
|
2018-12-07 11:57:05 +00:00
|
|
|
- /etc/nginx/certs:/etc/nginx/certs:ro
|
|
|
|
|
|
|
|
halo:
|
|
|
|
restart: always
|
|
|
|
image: ruibaby/halo
|
|
|
|
container_name: halo
|
|
|
|
ports:
|
|
|
|
- 8090:8090
|
|
|
|
environment:
|
2018-12-29 05:01:31 +00:00
|
|
|
- VIRTUAL_PORT=8090
|
2019-03-22 17:33:12 +00:00
|
|
|
- VIRTUAL_HOST=localhost # 你的博客地址(务必修改)
|
|
|
|
- LETSENCRYPT_HOST=localhost # 你的博客地址 (务必修改)
|
2018-12-29 05:01:31 +00:00
|
|
|
- LETSENCRYPT_EMAIL=i@example.com # 证书所有者的邮箱,快过期时会提醒(务必修改)
|
2018-12-07 11:57:05 +00:00
|
|
|
volumes:
|
2019-05-11 02:10:54 +00:00
|
|
|
- ~/.halo:/root/.halo
|
2018-12-07 11:57:05 +00:00
|
|
|
|
2018-12-07 16:56:03 +00:00
|
|
|
docker-gen:
|
2018-12-07 11:57:05 +00:00
|
|
|
restart: always
|
|
|
|
image: jwilder/docker-gen
|
2018-12-07 16:56:03 +00:00
|
|
|
container_name: docker-gen
|
2018-12-07 11:57:05 +00:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
|
|
- /etc/nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
|
|
|
|
volumes_from:
|
|
|
|
- nginx
|
|
|
|
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s
|
|
|
|
/etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
letsencrypt-nginx-proxy-companion:
|
|
|
|
restart: always
|
|
|
|
image: jrcs/letsencrypt-nginx-proxy-companion
|
|
|
|
container_name: letsencrypt-nginx-proxy-companion
|
|
|
|
volumes_from:
|
|
|
|
- nginx
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2018-12-07 16:56:03 +00:00
|
|
|
- /etc/nginx/certs:/etc/nginx/certs:rw
|
|
|
|
environment:
|
|
|
|
- NGINX_DOCKER_GEN_CONTAINER=docker-gen
|