Parameterized docker-compose.yml file using .env
This commit is contained in:
parent
ab9b6fc372
commit
75a2512438
4
.env.example
Normal file
4
.env.example
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
BROKER_MQTT_PORT=1883
|
||||||
|
BROKER_MQTTS_PORT=8883
|
||||||
|
HTTP_PORT=7700
|
||||||
|
CONFIG_DIR=./example-config
|
|
@ -6,7 +6,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: ./tor
|
context: ./tor
|
||||||
args:
|
args:
|
||||||
- SVC_PORT=1883
|
- SVC_PORT=${BROKER_MQTT_PORT}
|
||||||
- SVC_HOST=broker
|
- SVC_HOST=broker
|
||||||
networks:
|
networks:
|
||||||
- tor_net
|
- tor_net
|
||||||
|
@ -15,10 +15,10 @@ services:
|
||||||
image: eclipse-mosquitto
|
image: eclipse-mosquitto
|
||||||
volumes:
|
volumes:
|
||||||
- broker_data:/mosquitto/data
|
- broker_data:/mosquitto/data
|
||||||
- ./config:/mosquitto/config:ro
|
- ${CONFIG_DIR}:/mosquitto/config:ro
|
||||||
ports:
|
ports:
|
||||||
- "1883:1883"
|
- ${BROKER_MQTT_PORT}:${BROKER_MQTT_PORT}
|
||||||
- "8883:8883"
|
- ${BROKER_MQTTS_PORT}:${BROKER_MQTTS_PORT}
|
||||||
networks:
|
networks:
|
||||||
- tor_net
|
- tor_net
|
||||||
- broker_net
|
- broker_net
|
||||||
|
@ -27,9 +27,9 @@ services:
|
||||||
build: './subscriber'
|
build: './subscriber'
|
||||||
volumes:
|
volumes:
|
||||||
- client_data:/data
|
- client_data:/data
|
||||||
- ./config:/etc/torch:ro
|
- ${CONFIG_DIR}:/etc/torch:ro
|
||||||
ports:
|
ports:
|
||||||
- "7700:8080"
|
- ${HTTP_PORT}:8080
|
||||||
networks:
|
networks:
|
||||||
- broker_net
|
- broker_net
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user