Run the whole Brew Inventory stack locally with a single command. Brew Inventory is a full-stack inventory management app for specialty coffee and tea stores.
This repo contains only the Docker Compose setup. The application code lives in two separate repos, which Compose builds directly from GitHub:
| Service | Source | Description |
|---|---|---|
client |
brew-inventory-client | React frontend, served by nginx |
server |
brew-inventory-server | Express REST API |
db |
Official postgres:17-alpine image |
PostgreSQL database |
db-setup |
Same image as server |
One-shot job that creates tables and seeds data |
- Docker with Docker Compose v2 (included in Docker Desktop)
- Internet access on the first run, since the images are built from the GitHub repos
You don't need Node.js or PostgreSQL installed, and you don't need to clone the client and server repos.
-
Clone this repo:
git clone https://github.com/Maddily/brew-inventory.git cd brew-inventory -
Create your environment file:
cp .env.example .env
-
Edit
.envand replace the placeholder values (see Configuration). -
Build and start everything:
docker compose up --build
-
Open http://localhost:8080.
The first build takes a few minutes. Later starts are much faster.
All settings live in .env. Compose refuses to start if any of them is missing.
| Variable | Description |
|---|---|
POSTGRES_USER |
Database user |
POSTGRES_PASSWORD |
Database password |
POSTGRES_DB |
Database name |
ADMIN_PASSWORD |
Password the app asks for before editing or deleting a product |
Note: The
brew123password shown in the client and server READMEs is only for the public live demo. In this local stack, the admin password is whatever you set asADMIN_PASSWORDin.env.
dbstarts and passes its healthcheck.db-setuprunsnode db/setup.js, which creates the tables, then loads the category, attribute and sample product data only if the database is empty.serverstarts oncedb-setuphas finished successfully.clientstarts.
Because of the empty-database check, restarting the stack keeps your data. If you see database already seeded, skipping in the db-setup logs, that's expected.
| URL | What |
|---|---|
| http://localhost:8080 | Frontend |
| http://localhost:3000 | API (used by the app) |
The database isn't exposed to your machine, only to the other containers.
Stop the stack and keep your data:
docker compose downStop the stack and delete all data (the next up reseeds from scratch):
docker compose down -vView logs:
docker compose logs -f # everything
docker compose logs db-setup # table creation and seeding
docker compose logs serverThe client and server are built from the default branch of their GitHub repos, and Docker caches the result. To pick up new commits, rebuild without cache:
docker compose build --no-cache
docker compose upset POSTGRES_USER in .env (or a similar message) on startup: your .env file is missing or incomplete. Check that you copied .env.example to .env and that every variable has a value.
The app loads but shows no products or errors: check docker compose logs db-setup and docker compose logs server. If setup failed, the server never starts.
Port already in use: something else on your machine is using port 3000 or 8080. Stop it, or change the left side of the ports mapping in compose.yaml (for example "8081:8080"). If you change the API port, also update VITE_API_URL and FRONTEND_URL to match, and rebuild.
brew-inventory/
├── .env # your local settings (not committed)
├── .env.example
├── .gitignore
├── compose.yaml
└── README.md