Here's what we need to do:
Docker Desktop should be starting now. Wait ~30 seconds for it to fully start.
You'll know it's ready when you see the Docker icon in your menu bar (top right) show as running.
Once Docker is ready, run:
cd /Users/daniel.yeam/repos/_yeam-app-winebrt
docker-compose up -dThis starts:
- PostgreSQL (database)
- OpenFGA (authorization server)
- MinIO (image storage)
Wait ~10 seconds for services to initialize.
Run these commands to create the OpenFGA store and model:
# Create store
STORE_RESPONSE=$(curl -X POST http://localhost:8080/stores \
-H "Content-Type: application/json" \
-d '{"name": "winebrt"}')
echo $STORE_RESPONSE
# Extract store ID (you'll see output like: "id":"01JB...")
STORE_ID="PASTE_STORE_ID_HERE"
# Upload authorization model
MODEL_RESPONSE=$(curl -X POST "http://localhost:8080/stores/$STORE_ID/authorization-models" \
-H "Content-Type: application/json" \
-d @model.fga)
echo $MODEL_RESPONSE
# Extract model ID (you'll see output like: "authorization_model_id":"01JB...")
MODEL_ID="PASTE_MODEL_ID_HERE"Create backend/.env with these values (replace STORE_ID and MODEL_ID):
cd backend
cat > .env << 'EOF'
DATABASE_URL=postgresql://winebrt:winebrt_dev@localhost:5432/winebrt
FGA_API_URL=http://localhost:8080
FGA_STORE_ID=YOUR_STORE_ID_FROM_STEP_3
FGA_MODEL_ID=YOUR_MODEL_ID_FROM_STEP_3
S3_ENDPOINT_URL=http://localhost:9000
S3_ACCESS_KEY=winebrt
S3_SECRET_KEY=winebrt_dev
S3_BUCKET_NAME=winebrt-images
SECRET_KEY=dev-secret-key-change-in-production-abc123
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
EOF# Still in backend directory
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt# Still in backend directory with venv activated
alembic upgrade head# Using Docker to run MinIO client
docker run --rm --network host \
minio/mc alias set local http://localhost:9000 winebrt winebrt_dev
docker run --rm --network host \
minio/mc mb local/winebrt-images# Still in backend directory with venv activated
uvicorn app.main:app --reloadYou should see:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process
INFO: Started server process
INFO: Waiting for application startup.
INFO: Application startup complete.
Open browser to: http://localhost:8000/docs
You should see the Swagger UI with all the API endpoints!
✅ Docker Desktop is starting...
⏳ Waiting for Docker to be ready
⬜ Haven't started services yet
⬜ Haven't setup OpenFGA yet
⬜ Haven't created .env yet
⬜ Haven't setup Python yet
⬜ Haven't run migrations yet
⬜ Haven't started backend yet
You can check by running:
docker psIf you see a table (even if empty), Docker is ready!