Docker Swarm Keyrock Mysql subnetwork connection

81 Views Asked by At

IMPORTANT: I need to deploy it using Docker Swarm (no docker-compose).

I have created a docker-compose file in order to deploy my FIWARE stack. That stack includes keyrock and a Mysql BD that are connected using the following subnet and assigning static IP to the components:

networks:
    default:
        ipam:
            config:
                - subnet: 172.18.1.0/24

The problem is that using the FIWARE documentation, it's not possible to deploy it using docker swarm v3 because it's not possible to assign a static IP to the FIWARE components.

Could you give an example to deploy it using docker swarm v3?

1

There are 1 best solutions below

0
On

This is how I have it

networks:

front:
    driver: overlay
    ipam:
        config:
            - subnet: 172.40.0.0/16

keyrock:
    driver: overlay
    ipam:
        config:
            - subnet: 172.42.0.0/16

Add this for mysql networks: - keyrock

and add this for Keyrock networks: - front - keyrock