Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jacksoncharles/f131eed72cb4db88f135f552ad22c386 to your computer and use it in GitHub Desktop.
Save jacksoncharles/f131eed72cb4db88f135f552ad22c386 to your computer and use it in GitHub Desktop.
docker-compose file currently used by Charles for loading SSO and OMG with service discovery and gateway.
productsapi:
build: ./productsapi
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
ports:
- "80"
volumes:
- ./productsapi:/var/www
environment:
- SERVICE_NAME=PRODUCTSAPI
- SERVICE_TAGS=URLDOMAIN=api.products.co.uk,URLPREFIX=/,ACCESSEXTERNAL=true,ACCESSAUTHREQUIRED=false
restart: always
products:
build: ./products
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
ports:
- "80"
volumes:
- ./products/public:/var/www
environment:
- SERVICE_NAME=PRODUCTS
- SERVICE_TAGS=URLDOMAIN=products.co.uk,URLPREFIX=/,ACCESSEXTERNAL=true,ACCESSAUTHREQUIRED=false
restart: always
ssoapi:
build: ./ssoapi
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
ports:
- "80"
volumes:
- ./ssoapi:/var/www
links:
- ssoapidb:ssoapidb
environment:
- SERVICE_NAME=SSOAPI
- SERVICE_TAGS=URLDOMAIN=api.sso.co.uk,URLPREFIX=/,ACCESSEXTERNAL=true,ACCESSAUTHREQUIRED=false
restart: always
ssoapidb:
image: mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
restart: alway
sso:
build: ./sso
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
ports:
- "80"
volumes:
- ./sso/public:/var/www
environment:
- SERVICE_NAME=SSO
- SERVICE_TAGS=URLDOMAIN=sso.co.uk,URLPREFIX=/,ACCESSEXTERNAL=true,ACCESSAUTHREQUIRED=false
restart: always
consul:
command: -server -bootstrap -advertise 172.17.0.1
image: gliderlabs/consul-server:latest
ports:
- "8300:8300"
- "8400:8400"
- "8500:8500"
- "8600:53/udp"
restart: always
registrator:
command: -ip 172.17.0.1 consul://172.17.0.1:8500
image: gliderlabs/registrator:latest
net: host
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: always
bouncer:
build: ./gateway
ports:
- "80:80"
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
volumes:
- ./gateway/templates/service.ctmpl:/templates/service.ctmpl
environment:
- CONSUL_URL=172.17.0.1:8500
restart: always
omggateway:
build: ./omg-gateway
ports:
- "80"
dns:
- 172.16.4.2
- 172.16.4.13
- 10.49.32.4
volumes:
- ./omg-gateway:/var/www
environment:
- SERVICE_NAME=OMGGATEWAY
- SERVICE_TAGS=URLDOMAIN=omg.gateway,URLPREFIX=/,ACCESSEXTERNAL=true,ACCESSAUTHREQUIRED=false
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment