Skip to content

Instantly share code, notes, and snippets.

@hanrw
Created June 26, 2017 08:15
Show Gist options
  • Save hanrw/5f553016a3e6c358334a55cd8e9fa83a to your computer and use it in GitHub Desktop.
Save hanrw/5f553016a3e6c358334a55cd8e9fa83a to your computer and use it in GitHub Desktop.
version: '2'
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: demop@ssword
volumes:
- /home/finnplay/docker/var/lib/mysql:/var/lib/mysql
labels:
o.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: type=db
tomcat-bo:
image: tomcat:8.5.15-jre8
links:
- mysql:db
ports:
- 38080:8080/tcp
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: type=backoffice
tomcat-web:
image: tomcat:8.5.15-jre8
links:
- mysql:db
ports:
- 38080:8080/tcp
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: type=frontend
apache2-bo:
image: lzrbear/docker-apache2-ubuntu
ports:
- 80:80
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: type=backoffice
apache2-web:
image: lzrbear/docker-apache2-ubuntu
ports:
- 80:80
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: type=frontend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment