1.9 KiB
1.9 KiB
Setup
Prerequisites
- Docker + Docker Compose
- Spotify Developer account (Client ID/Secret)
- A unique
APP_SECRETvalue in your environment (for prod builds)
1) Start the stack
docker compose up -d --build
App: http://localhost:8085
Health: http://localhost:8085/healthz
2) Create an admin
docker compose exec tonehaus php bin/console app:promote-admin you@example.com
3) Configure Spotify
- Preferred: open
/admin/settingsand enter your Client ID/Secret (stored in DB) - Env fallback (in
.envor your shell):
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
4) (Optional) Seed demo data
docker compose exec tonehaus php bin/console app:seed-demo-users --count=50
docker compose exec tonehaus php bin/console app:seed-demo-albums --count=40 --attach-users
docker compose exec tonehaus php bin/console app:seed-demo-reviews --cover-percent=70 --max-per-album=8
Database drivers
- SQLite (default): set
DATABASE_DRIVER=sqlite(default) — data stored atvar/data/database.sqlite - Postgres: set
DATABASE_DRIVER=postgresand provideDATABASE_URL- If you enable the commented
dbservice indocker-compose.yml, a typical URL is:postgresql://symfony:symfony@db:5432/symfony?serverVersion=16&charset=utf8
- If you enable the commented
Environment variables
APP_ENV=dev|prodAPP_SECRET=<random_string>SPOTIFY_CLIENT_ID,SPOTIFY_CLIENT_SECRETAPP_ALLOW_REGISTRATION=1|0(env can override DB setting)DATABASE_DRIVER=sqlite|postgresDATABASE_SQLITE_PATH(optional)RUN_MIGRATIONS_ON_START=1|0(default 1)
Useful commands
# Symfony cache
docker compose exec tonehaus php bin/console cache:clear
# Inspect routes
docker compose exec tonehaus php bin/console debug:router
# Promote moderator
docker compose exec tonehaus php bin/console app:promote-moderator mod@example.com