Hub de Sensores web.sensoriando.com.br
- Create docker's images
docker-compose build
- Docker
docker network create sensoriando
docker-compose up -d
-
Postgres
3.1. Set password
docker exec -it sensoriando_database psql -U postgres
ALTER USER postgres PASSWORD '[your passwd]'; QUIT
3.2. Create schemes
cd database ./install.sh sensoriando_database
3.3. Load demo records (opcional)
docker exec -it sensoriando_database psql -U postgres -d sensoriando -f demo.sql
-
Mosquitto 3.1. Set password
docker exec -it sensoriando_broker mosquitto_passwd -b /mosquitto/config/mosquitto.users [you username] [your password]
-
Environment Create .env file
touch .env
contexts .env file:
export MOSQUITTO_HOST=sensoriando_broker
export MOSQUITTO_USER=mosquitto
export MOSQUITTO_PASSWORD="your password"
export MOSQUITTO_PORT=1883
export MOSQUITTO_QOS=1
export MOSQUITTO_RETAINED=0
export POSTGRES_HOST=sensoriando_database
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD="your password"
export POSTGRES_DB=sensoriando
export POSTGRES_PORT=5432
- Reload
docker-compose restart