mirror of https://github.com/halo-dev/halo
✨ 支持docker-compose
parent
c0d1484b93
commit
b126f10662
|
@ -0,0 +1,50 @@
|
|||
version: '2'
|
||||
services:
|
||||
|
||||
nginx:
|
||||
restart: always
|
||||
image: nginx
|
||||
container_name: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- /etc/nginx/conf.d
|
||||
- /etc/nginx/vhost.d
|
||||
- /usr/share/nginx/html
|
||||
- /etc/nginx/certs:/etc/nginx/certs:ro
|
||||
|
||||
halo:
|
||||
restart: always
|
||||
image: ruibaby/halo
|
||||
container_name: halo
|
||||
ports:
|
||||
- 8090:8090
|
||||
environment:
|
||||
- VIRTUAL_PORT=8090 #监听的端口
|
||||
- VIRTUAL_HOST=127.0.0.1 #监听的地址
|
||||
- LETSENCRYPT_HOST=127.0.0.1 #证书的域名
|
||||
- LETSENCRYPT_EMAIL=i@example.com #证书所有者的邮箱,快过期时会提醒
|
||||
volumes:
|
||||
- ~/halo:/root/halo
|
||||
|
||||
nginx-gen:
|
||||
restart: always
|
||||
image: jwilder/docker-gen
|
||||
container_name: nginx-gen
|
||||
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
|
Loading…
Reference in New Issue