Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amjadafanah/e65a32585472cffba9a2bfdd34ead993 to your computer and use it in GitHub Desktop.
Save amjadafanah/e65a32585472cffba9a2bfdd34ead993 to your computer and use it in GitHub Desktop.
http-lb:
image: httpd:latest
publish_all: true
mem_min: 50m
host: host1
plugins:
- !plugin
id: uazUi
restart: true
lifecycle: on_create, post_scale_out:dotnet, post_scale_in:dotnet
arguments:
# Use container_private_ip if you're using Docker networking
- BalancerMembers=BalancerMember http://{{dotnet | container_private_ip}}:5000
# Use container_hostname if you're using Weave networking
#- BalancerMembers=BalancerMember http://{{dotnet | container_hostname}}:5000
dotnet:
image: dchq/dotnet-names-directory:latest
host: host1
mem_min: 200m
environment:
- database_driverClassName=postgres
- database_url=Host={{postgres | container_private_ip}};Database={{postgres | POSTGRES_DB}};Username={{postgres | POSTGRES_USER}};Password={{postgres | POSTGRES_PASSWORD}}
plugins:
- !plugin
id: hHjF0
lifecycle: post_create
restart: false
postgres:
image: postgres:latest
host: host1
mem_min: 300m
environment:
- POSTGRES_DB=NameDirectory
- POSTGRES_USER=root
- POSTGRES_PASSWORD={{alphanumeric | 8}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment