Skip to content

Getting Started

There are two supported ways to run EcoCtrl. Pick the one that matches your situation:

You want to…Use this path
Try it out quickly with everything in containersDocker Compose
Hack on the code locally with hot reloadSee the Development guide

Run with Docker Compose

This brings up PostgreSQL, the API server, the admin dashboard and the public web portal in one command.

Prerequisites

  • Docker 24+ with the Compose plugin
  • Free TCP ports: 3000 (API), 4173 (admin), 8081 (web), 5432 (Postgres)

Steps

bash
git clone https://github.com/hyooeewee/ecoctrl.git
cd ecoctrl/docker
cp .env.example .env.local
# Open .env.local and set JWT_SECRET (required) and BASE_URL / APP_ID for the IoT gateway (optional).
docker compose -f compose.yml up --build

When the build finishes, the stack is reachable at:

ServiceURL
Web portalhttp://localhost:8081
Admin dashboardhttp://localhost:4173
REST APIhttp://localhost:3000
Swagger UIhttp://localhost:3000/documentation

First-time login

The seeded admin account is created on the very first run. The default credentials are admin / the password printed by pnpm db:seed (or set via INITIAL_ADMIN_PASSWORD in .env.local). Open the admin dashboard at http://localhost:4173 and sign in.

Stop the stack

bash
docker compose -f compose.yml down          # keep data
docker compose -f compose.yml down -v       # also wipe Postgres volume

What's next

Released under the MIT License.