forked from OpenSaasAU/RancherTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (56 loc) · 1.84 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '2'
services:
nginxWeb:
restart: always
image: nginx
volumes:
- nginxConf:/etc/nginx/conf.d
- ngincVhosts:/etc/nginx/vhost.d
- nginxHtml:/usr/share/nginx/html
- nginxCerts:/etc/nginx/certs:ro
ports:
- "80:80"
- "443:443"
nginxGen:
restart: always
image: jwilder/docker-gen
volumes_from:
- nginxWeb
volumes:
- /home/ubuntu/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
command: |
-notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
nginxLetsencrypt:
restart: always
environment:
NGINX_DOCKER_GEN_CONTAINER: ranchercompose_nginxGen_1
volumes_from:
- nginxWeb
volumes:
- nginxCerts:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
image: jrcs/letsencrypt-nginx-proxy-companion
rancherServer:
restart: always
environment:
CATTLE_DB_CATTLE_MYSQL_HOST: mysqldb
CATTLE_DB_CATTLE_MYSQL_PORT: 3306
CATTLE_DB_CATTLE_MYSQL_NAME: cattle
CATTLE_DB_CATTLE_USERNAME: cattle
CATTLE_DB_CATTLE_PASSWORD: password
VIRTUAL_HOST: rancher.opensaas.local
VIRTUAL_PORT: 8080
LETSENCRYPT_HOST: rancher.opensaas.local
LETSENCRYPT_EMAIL: [email protected]
image: rancher/server
mysqldb:
restart: always
environment:
MYSQL_PASSWORD: password
MYSQL_USERNAME: cattle
MYSQL_DATABASE: cattle
MYSQL_ROOT_PASSWORD: password
image: mysql
volumes:
- rancherMysqlData:/var/lib/mysql