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-adminto run the full-stack application, link.eclipse-mosquittoto run mqtt broker, link.
- Installed docker engine and docker compose.
- Proxy to expose secure connections (e.g Cloudflare).
- Clone this repository.
- Rename
example.envto.envand set variables. - Execute
docker-compose up -dto start. - Run
docker exec -it nuxt npx prisma migrate dev --schema prisma/sql.schema.prisma --skip-generateto effect database migration. - Set mosquitto password
- Run
docker exec mosquitto chown root /mosquitto/config/password_file.txtto 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.