diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6249c16 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +BROKER_MQTT_PORT=1883 +BROKER_MQTTS_PORT=8883 +HTTP_PORT=7700 +CONFIG_DIR=./example-config diff --git a/docker-compose.yml b/docker-compose.yml index dab6181..ab27fb2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/config/ca.crt b/example-config/ca.crt similarity index 100% rename from config/ca.crt rename to example-config/ca.crt diff --git a/config/mosquitto.conf b/example-config/mosquitto.conf similarity index 100% rename from config/mosquitto.conf rename to example-config/mosquitto.conf diff --git a/config/mqtt.example.com.crt b/example-config/mqtt.example.com.crt similarity index 100% rename from config/mqtt.example.com.crt rename to example-config/mqtt.example.com.crt diff --git a/config/mqtt.example.com.key b/example-config/mqtt.example.com.key similarity index 100% rename from config/mqtt.example.com.key rename to example-config/mqtt.example.com.key diff --git a/config/subscriber.crt b/example-config/subscriber.crt similarity index 100% rename from config/subscriber.crt rename to example-config/subscriber.crt diff --git a/config/subscriber.key b/example-config/subscriber.key similarity index 100% rename from config/subscriber.key rename to example-config/subscriber.key diff --git a/config/torch-sub.conf b/example-config/torch-sub.conf similarity index 100% rename from config/torch-sub.conf rename to example-config/torch-sub.conf