Make network and netmask configurable via environment parameter#1
Open
tkaefer wants to merge 1 commit intowojas:masterfrom
Open
Make network and netmask configurable via environment parameter#1tkaefer wants to merge 1 commit intowojas:masterfrom
tkaefer wants to merge 1 commit intowojas:masterfrom
Conversation
Author
|
One example for setting up a aka cluster with own IP network/netmask: version: '2'
services:
seed:
image: mhamrah/clustering:0.3
ports:
- '1600:1600'
environment:
CLUSTER_PORT: 1600
# CLUSTER_IP: seed
SEED_PORT_1600_TCP_ADDR: 100.64.1.10
HOST: seed
networks:
backend:
ipv4_address: 100.64.1.10
c1:
image: mhamrah/clustering:0.3
ports:
- '1601:1601'
environment:
CLUSTER_PORT: 1601
# CLUSTER_IP: 100.64.1.11
SEED_PORT_1600_TCP_ADDR: 100.64.1.10
HOST: c1
networks:
backend:
ipv4_address: 100.64.1.11
c2:
image: mhamrah/clustering:0.3
ports:
- '1602:1602'
environment:
CLUSTER_PORT: 1602
# CLUSTER_IP: 100.64.1.12
SEED_PORT_1600_TCP_ADDR: 100.64.1.10
HOST: c2
networks:
backend:
ipv4_address: 100.64.1.12
proxy:
image: tkaefer/docker-mac-network
ports:
- "127.0.0.1:13194:13194"
command: TCP-LISTEN:13194,fork TCP:100.64.1.20:1194
networks:
backend:
openvpn:
image: kylemanna/openvpn
volumes:
- ./config:/etc/openvpn
- ./local:/local
cap_add:
- NET_ADMIN
environment:
dest: akka-mac-docker.ovpn
DEBUG: '1'
DOCKER_NETWORK: 100.64.1.0
DOCKER_NETMASK: 255.255.255.192
command: /local/helpers/run.sh
networks:
backend:
ipv4_address: 100.64.1.20
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: 100.64.1.0/26
gateway: 100.64.1.1The environment variables exposed as: DOCKER_NETWORK: 100.64.1.0
DOCKER_NETMASK: 255.255.255.192will ensure the right routing in the OpenVPN client config file. |
Owner
|
@tkaefer Sorry for the late response. Merging, thanks! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will enable the setup to have different networks and netmasks being used.