Last active
June 9, 2021 20:33
-
-
Save Chriz76/d054ab5714bbd5dfc6758c6e515676a5 to your computer and use it in GitHub Desktop.
This file contains 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: | |
webservice: | |
image: 'postservice:latest' | |
cpus: 0.5 | |
scale: 4 | |
environment: | |
- PostDbConnectionStrings__Shard1=server=database0; port=3306; database=post; user=root; password=pw; Persist Security Info=False; Connect Timeout=300 | |
- PostDbConnectionStrings__Shard1=server=database1; port=3306; database=post; user=root; password=pw; Persist Security Info=False; Connect Timeout=300 | |
# - PostDbConnectionStrings__Shard2=server=database2; port=3306; database=post; user=root; password=pw; Persist Security Info=False; Connect Timeout=300 | |
loadbalancer: | |
image: dockercloud/haproxy | |
links: | |
- webservice | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
ports: | |
- 5001:80 | |
database0: | |
image: 'mysql:5.6' | |
cpus: 0.5 | |
ports: | |
- 3312:3306 | |
environment: | |
- MYSQL_ROOT_PASSWORD=pw | |
database1: | |
image: 'mysql:5.6' | |
cpus: 0.5 | |
ports: | |
- 3313:3306 | |
environment: | |
- MYSQL_ROOT_PASSWORD=pw | |
database2: | |
image: 'mysql:5.6' | |
cpus: 0.5 | |
ports: | |
- 3314:3306 | |
environment: | |
- MYSQL_ROOT_PASSWORD=pw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment