This repo proposes a docker-compose to self-host the application. It uses SQLite for database and filesystem for storage.
The included services are
becemgharbi/esp-admin
to run the full-stack application, link.eclipse-mosquitto
to run mqtt broker, link.
- Installed docker engine and docker compose.
- Proxy to expose secure connections (e.g Cloudflare).
- Clone this repository.
- Rename
example.env
to.env
and set variables. - Execute
docker-compose up -d
to start. - Run
docker exec -it nuxt npx prisma migrate dev --schema prisma/sql.schema.prisma --skip-generate
to effect database migration. - Set mosquitto password
- Run
docker exec mosquitto chown root /mosquitto/config/password_file.txt
to set permissions. - Run
docker exec mosquitto mosquitto_passwd -c -b /mosquitto/config/password_file.txt {USERNAME} {PASSWORD}
to change password.
- Run
- Restart containers
docker-compose restart
.
Now the application is running on port 3000
and the mqtt broker on ports 1883
9001
respectively for MQTT and Websockets connections.