Skip to content

Deploy with Docker

Quick start

bash
# 1. Make the deploy script executable
chmod +x deploy.sh

# 2. One-shot deploy (checks/prompts InfluxDB install)
./deploy.sh deploy

Commands

CommandWhat it does
./deploy.sh deployFull first-time deploy (recommended)
./deploy.sh startStart services
./deploy.sh stopStop services
./deploy.sh restartRestart services
./deploy.sh logsTail combined logs
./deploy.sh logs iot-serverTail backend logs
./deploy.sh statusShow service status
./deploy.sh updatePull & redeploy
./deploy.sh cleanWipe all data
./deploy.sh influxdbInstall InfluxDB 3 only

Manual deploy

bash
# 1. Copy env template
cp .env.example .env

# 2. Install InfluxDB 3 if missing
./deploy.sh influxdb
# or manually:
curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh

# 3. Edit .env (InfluxDB token, URL, database name)
vim .env

# 4. Build & start
docker compose up -d --build

# 5. Status / logs
docker compose ps
docker compose logs -f

InfluxDB 3

InfluxDB 3 must be installed on the host (not inside Docker). The deploy script detects and prompts when missing.

Manual install

bash
# macOS / Linux
curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh

# Start
influxdb3 serve --node-id=node0 --object-store=file --data-dir=~/.influxdb/data

# Create admin token
influxdb3 create token --admin

Connection config

In .env:

bash
# macOS — Docker reaching host services
INFLUXDB_URL=http://host.docker.internal:8181

# Linux — Docker reaching host services
INFLUXDB_URL=http://172.17.0.1:8181

Service ports

ServiceContainer portDefault host port
iot-server (REST)50105010
iot-server (MQTT TCP)18831883
iot-server (MQTT WS)80838083
iot-web (Nginx)8080
postgres54325432
rustfs90009000
influxdb8181host network

Default credentials

admin / 123456

Change it before exposing the stack to a public network.

Common pitfalls

  • Port already in use — adjust the host-side port in docker-compose.yml.
  • InfluxDB unreachable from container — confirm the host IP works (use host.docker.internal on macOS, 172.17.0.1 on Linux).
  • PostgreSQL password mismatch.env and the existing volume must match. Wipe with ./deploy.sh clean to rebuild.
  • Driver page dropdowns empty — was a v0.1.0 bug, fixed; pull latest main.

Upgrade

bash
git pull
./deploy.sh update

This rebuilds the images that changed and restarts the services in place.

Released under the MIT License.