How to run two Gateways with docker-compose
Last updated: 1 minute read.
Managing a second Tyk Gateway with our Tyk Pro Docker Demo is a case of mounting the tyk.conf
file into a new volume and declaring a new Gateway service but exposed on a different port.
You will need to make some minor modifications to docker-compose.yml
and start your services as usual with docker-compose up
.
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 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-compose.yml
(after the tyk-gateway
definition)
tyk-gateway2:
image: tykio/tyk-gateway:latest
ports:
- "8081:8080"
networks:
- tyk
depends_on:
- tyk-redis
volumes:
./confs/tyk.conf:/opt/tyk-gateway/tyk.conf