A Dockerized notes app with a Go (Gin + GORM/pgx) API, Vue 3 + Vite + TS frontend, and PostgreSQL.
- Go 1.25+
- Node.js 20+ (or the version you use with Vite)
- Docker + Docker Compose (for container workflow)
- Copy the root env file and adjust as needed:
cp .env.example .env- Run the API:
cd backend
go run ./cmd/serverThe API listens on http://localhost:8080 by default.
- Install deps and (optionally) copy the frontend env:
cd frontend/go-notes
npm install
cp .env.example .env- Start the dev server:
npm run devSet VITE_API_BASE_URL to http://localhost:8080/api/v1 for local API access.
- Copy env defaults:
cp .env.example .env- Build and run:
docker compose up --buildThe stack exposes the app through the nginx proxy at http://localhost. To expose the API or the static web container directly, uncomment the ports sections in docker-compose.yml and adjust VITE_API_BASE_URL accordingly.
PORT(API): 8080WEB_PORT(frontend dev): 4173DB_PORT(Postgres): 5432VITE_API_BASE_URL: front-end API base URLCORS_ALLOWED_ORIGINS: comma-separated origins allowed by the API for cross-origin requests
make api-dev– run the Go API locallymake api-test– run backend testsmake web-dev– run the Vue dev servermake web-build– build the frontendmake docker-up– build and run the stackmake docker-down– stop and clean volumes