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:
|
||||
context: ./tor
|
||||
args:
|
||||
- SVC_PORT=1883
|
||||
- SVC_PORT=${BROKER_MQTT_PORT}
|
||||
- SVC_HOST=broker
|
||||
networks:
|
||||
- tor_net
|
||||
|
@ -15,10 +15,10 @@ services:
|
|||
image: eclipse-mosquitto
|
||||
volumes:
|
||||
- broker_data:/mosquitto/data
|
||||
- ./config:/mosquitto/config:ro
|
||||
- ${CONFIG_DIR}:/mosquitto/config:ro
|
||||
ports:
|
||||
- "1883:1883"
|
||||
- "8883:8883"
|
||||
- ${BROKER_MQTT_PORT}:${BROKER_MQTT_PORT}
|
||||
- ${BROKER_MQTTS_PORT}:${BROKER_MQTTS_PORT}
|
||||
networks:
|
||||
- tor_net
|
||||
- broker_net
|
||||
|
@ -27,9 +27,9 @@ services:
|
|||
build: './subscriber'
|
||||
volumes:
|
||||
- client_data:/data
|
||||
- ./config:/etc/torch:ro
|
||||
- ${CONFIG_DIR}:/etc/torch:ro
|
||||
ports:
|
||||
- "7700:8080"
|
||||
- ${HTTP_PORT}:8080
|
||||
networks:
|
||||
- broker_net
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user