Created
April 13, 2019 05:07
-
-
Save Asherslab/4a1b4a55428151a45d1c902aa066ab3c to your computer and use it in GitHub Desktop.
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: '3.1' | |
services: | |
api: | |
image: asherslab/chatchain-api:prs-${Branch} | |
depends_on: | |
- mongodb | |
- identitydb | |
- identityserverdb | |
networks: | |
- webgateway | |
- internal | |
deploy: | |
restart_policy: | |
condition: any | |
mode: replicated | |
replicas: 1 | |
update_config: | |
delay: 2s | |
placement: | |
constraints: | |
- node.role == worker | |
labels: | |
- traefik.enable=true | |
- traefik.docker.network=webgateway | |
- traefik.port=80 | |
- traefik.frontend.rule=Host:${Branch}.api.chatchain.co | |
- traefik.backend.loadbalancer.sticky=true | |
environment: | |
- CLIENTS_AND_GROUPS_DATABASE=mongodb://root:password@mongodb:27017/admin | |
- IDENTITY_SERVER_URL=http://identity | |
- REDIS_BACKPLANE=redis | |
- WAIT_HOSTS=mongodb:27017,redis:6379 | |
- WAIT_HOSTS_TIMEOUT=240 | |
identity: | |
image: asherslab/chatchain-identity:prs-${Branch} | |
ports: | |
- 80 | |
depends_on: | |
- mongodb | |
- identitydb | |
- identityserverdb | |
networks: | |
- webgateway | |
- internal | |
deploy: | |
restart_policy: | |
condition: any | |
mode: replicated | |
replicas: 1 | |
update_config: | |
delay: 2s | |
placement: | |
constraints: | |
- node.role == worker | |
labels: | |
- traefik.enable=true | |
- traefik.docker.network=webgateway | |
- traefik.port=80 | |
- traefik.frontend.rule=Host:${Branch}.identity.chatchain.co | |
- traefik.backend.loadbalancer.sticky=true | |
environment: | |
- IDENTITY_SERVER_URL=http://identity | |
- IDENTITY_SERVER_DATABASE_CONNECTION=mongodb://root:password@mongodb/admin | |
- IDENTITY_SERVER_DATABASE=ChatChainIdentityServer | |
- WAIT_HOSTS=redis:6379,mongodb:27017 | |
- WAIT_HOSTS_TIMEOUT=240 | |
- IDENTITY_SERVER_ORIGIN=https://${Branch}.identity.chatchain.co | |
- REDIS_STACK_EXCHANGE=redis:6379 | |
webapp: | |
image: asherslab/chatchain-webapp:prs-${Branch} | |
ports: | |
- 80 | |
depends_on: | |
- mongodb | |
- identitydb | |
- identityserverdb | |
networks: | |
- webgateway | |
- internal | |
deploy: | |
restart_policy: | |
condition: any | |
mode: replicated | |
replicas: 1 | |
update_config: | |
delay: 2s | |
placement: | |
constraints: | |
- node.role == worker | |
labels: | |
- traefik.enable=true | |
- traefik.docker.network=webgateway | |
- traefik.port=80 | |
- traefik.frontend.rule=Host:${Branch}.chatchain.co | |
- traefik.backend.loadbalancer.sticky=true | |
environment: | |
- CLIENTS_AND_GROUPS_DATABASE=mongodb://root:password@mongodb/admin | |
- IDENTITY_DATABASE=mongodb://root:password@mongodb/admin | |
- IDENTITY_SERVER_DATABASE_CONNECTION=mongodb://root:password@mongodb/admin | |
- IDENTITY_SERVER_DATABASE=ChatChainIdentityServer | |
- WAIT_HOSTS=mongodb:27017,redis:6379 | |
- WAIT_HOSTS_TIMEOUT=240 | |
- REDIS_STACK_EXCHANGE=redis:6379 | |
mongodb: | |
image: mongo:3.4 | |
networks: | |
- internal | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME=root | |
- MONGO_INITDB_ROOT_PASSWORD=password | |
volumes: | |
- mongo-databases:/data/db | |
deploy: | |
placement: | |
constraints: | |
- node.role == manager | |
redis: | |
image: redis | |
deploy: | |
placement: | |
constraints: | |
- node.role == manager | |
networks: | |
- internal | |
volumes: | |
mongo-databases: | |
networks: | |
webgateway: | |
external: true | |
internal: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment