How to run two Gateways with docker-compose
Managing a second Tyk Gateway with our tyk-pro-docker-demo is a case of mounting the config file into a new volume and declaring a new gateway service but exposed it on a different port.
You will need to make some minor modifications to docker-compose.yml and docker-local.yml and start your services as usual with
docker-compose -f docker-compose.yml -f docker-local.yml up.
Please note: This will only work with an appropriate license. The free license is for development purposes and would allow running Tyk’s licensed platform with only one Gateway. If you want to test Tyk with more please contact us by this email [email protected] and we will be happy to discuss your case and PoC requirements as well as providing a short period license.
Add the following to docker-local.yml
tyk-gateway2: volumes: - ./confs/tyk.conf:/opt/tyk-gateway/tyk.conf
Add the following to docker-compose.yml (after
tyk-gatewaydefinition): ```yml tyk-gateway2: image: tykio/tyk-gateway:latest ports:
- “8081:8080” networks:
- tyk depends_on:
- tyk-redis ```