Files
RetroHub/docker-compose.dev.yml
T

105 lines
2.6 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: retrohub-dev-app
ports:
- "8000:80"
volumes:
- .:/var/www/retrohub
- retrohub-dev-roms:/var/www/retrohub/storage/app/roms
- retrohub-dev-saves:/var/www/retrohub/storage/app/saves
- retrohub-dev-covers:/var/www/retrohub/storage/app/covers
environment:
- APP_ENV=local
- APP_DEBUG=true
- APP_URL=http://localhost:8000
- DB_CONNECTION=pgsql
- DB_HOST=db
- DB_PORT=5432
- DB_DATABASE=retrohub
- DB_USERNAME=retrohub
- DB_PASSWORD=secret
- REDIS_HOST=redis
- CACHE_DRIVER=redis
- SESSION_DRIVER=redis
- QUEUE_CONNECTION=redis
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: >
sh -c "php artisan migrate --force &&
php artisan db:seed --force &&
php artisan serve --host=0.0.0.0 --port=80"
db:
image: pgvector/pgvector:pg16
container_name: retrohub-dev-db
ports:
- "5432:5432"
volumes:
- retrohub-dev-db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=retrohub
- POSTGRES_USER=retrohub
- POSTGRES_PASSWORD=secret
healthcheck:
test: ["CMD-SHELL", "pg_isready -U retrohub"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: retrohub-dev-redis
ports:
- "6379:6379"
volumes:
- retrohub-dev-redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
worker:
build:
context: .
dockerfile: Dockerfile
container_name: retrohub-dev-worker
command: php artisan horizon
volumes:
- .:/var/www/retrohub
- retrohub-dev-roms:/var/www/retrohub/storage/app/roms
- retrohub-dev-saves:/var/www/retrohub/storage/app/saves
- retrohub-dev-covers:/var/www/retrohub/storage/app/covers
environment:
- APP_ENV=local
- APP_DEBUG=true
- APP_URL=http://localhost:8000
- DB_CONNECTION=pgsql
- DB_HOST=db
- DB_PORT=5432
- DB_DATABASE=retrohub
- DB_USERNAME=retrohub
- DB_PASSWORD=secret
- REDIS_HOST=redis
- CACHE_DRIVER=redis
- SESSION_DRIVER=redis
- QUEUE_CONNECTION=redis
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
retrohub-dev-db:
retrohub-dev-redis:
retrohub-dev-roms:
retrohub-dev-saves:
retrohub-dev-covers: