Saas for SME
Telegram food ordering miniapp
Telegram ecommerce miniapp
java 21
maven 3.9.11
➜ yoobu-api git:(master) ✗ mvn -v
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: /Users/solairerove/.sdkman/candidates/maven/current
Java version: 21.0.10, vendor: Oracle Corporation, runtime: /Users/solairerove/.sdkman/candidates/java/21.0.10-oracle
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "26.3.1", arch: "aarch64", family: "mac"Create the shared Docker network once (if it doesn't exist yet):
docker network create yoobu-netStart only the database:
docker compose up -dThen run the app locally — all env vars have sensible defaults for this setup:
mvn spring-boot:run
# or
mvn clean install && java -jar target/yoobu-api-0.0.1-SNAPSHOT.jar --spring.profiles.active=devRun everything (PostgreSQL + Java app) in Docker — useful when working on a 3rd-party service that needs this API up:
docker-compose --profile full up -dThe first run builds the image from the Dockerfile (includes Maven build, takes a few minutes). Subsequent starts are instant.
Tear everything down:
docker-compose --profile full down# All tests (unit + integration via Testcontainers)
mvn clean verify
# Unit tests only
mvn testSet CORS_ALLOWED_ORIGIN_PATTERNS to your frontend origins if you want to lock CORS down more tightly than the default Railway wildcard.
Example:
CORS_ALLOWED_ORIGIN_PATTERNS=https://yoobu-web-production.up.railway.app,https://your-custom-domain.comrailway.toml configures Railway to build from the repository Dockerfile, wait for GET /health, and restart on failures.
You still need to set runtime variables manually in Railway, at minimum:
DB_URL=...
DB_USER=...
DB_PASS=...
SUPERADMIN_USER=...
SUPERADMIN_PASS=...