Created
April 26, 2017 14:56
-
-
Save egobude/7551ec7dbef532030b5b9669b9697da6 to your computer and use it in GitHub Desktop.
Rancher - Load Balancer Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
nginx: | |
image: docker-registry.avency.de:5000/avency/nginx:1.11-alpine | |
stdin_open: true | |
volumes: | |
- /docker/nginx-phpfpm/data:/data | |
- /docker/nginx-phpfpm/nginx.conf:/etc/nginx/nginx.conf | |
- /docker/nginx-phpfpm/default.conf:/etc/nginx/conf.d/default.conf | |
tty: true | |
links: | |
- phpfpm-lb:phpfpm | |
labels: | |
io.rancher.container.pull_image: always | |
phpfpm: | |
image: docker-registry.avency.de:5000/avency/php:7.1-fpm-alpine | |
stdin_open: true | |
volumes: | |
- /docker/nginx-phpfpm/data:/data | |
tty: true | |
links: | |
- mysql:mysql | |
labels: | |
io.rancher.container.pull_image: always | |
phpfpm-lb: | |
image: rancher/lb-service-haproxy:v0.6.4 | |
expose: | |
- 9000:9000/tcp | |
labels: | |
io.rancher.container.agent.role: environmentAdmin | |
io.rancher.container.create_agent: 'true' | |
mysql: | |
image: docker-registry.avency.de:5000/avency/mysql:8.0-debian-jessie | |
environment: | |
MYSQL_ROOT_PASSWORD: test | |
MYSQL_DATABASE: test | |
stdin_open: true | |
tty: true | |
command: | |
- mysqld | |
- --character-set-server=utf8 | |
- --collation-server=utf8_unicode_ci | |
labels: | |
io.rancher.container.pull_image: always | |
nginx-lb: | |
image: rancher/lb-service-haproxy:v0.6.4 | |
ports: | |
- 85:85/tcp | |
labels: | |
io.rancher.container.agent.role: environmentAdmin | |
io.rancher.container.create_agent: 'true' | |
redis: | |
image: docker-registry.avency.de:5000/avency/redis:3.2-alpine | |
stdin_open: true | |
tty: true | |
labels: | |
io.rancher.container.pull_image: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
nginx: | |
scale: 1 | |
start_on_create: true | |
phpfpm: | |
scale: 1 | |
start_on_create: true | |
phpfpm-lb: | |
scale: 1 | |
start_on_create: true | |
lb_config: | |
certs: [] | |
port_rules: | |
- hostname: '' | |
priority: 1 | |
protocol: tcp | |
service: phpfpm | |
source_port: 9000 | |
target_port: 9000 | |
health_check: | |
response_timeout: 2000 | |
healthy_threshold: 2 | |
port: 42 | |
unhealthy_threshold: 3 | |
initializing_timeout: 60000 | |
interval: 2000 | |
reinitializing_timeout: 60000 | |
mysql: | |
scale: 1 | |
start_on_create: true | |
nginx-lb: | |
scale: 1 | |
start_on_create: true | |
lb_config: | |
certs: [] | |
port_rules: | |
- path: '' | |
priority: 1 | |
protocol: http | |
service: nginx | |
source_port: 85 | |
target_port: 80 | |
health_check: | |
response_timeout: 2000 | |
healthy_threshold: 2 | |
port: 42 | |
unhealthy_threshold: 3 | |
initializing_timeout: 60000 | |
interval: 2000 | |
reinitializing_timeout: 60000 | |
redis: | |
scale: 1 | |
start_on_create: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment