- Import Cannabrands data from MySQL to PostgreSQL (strains, categories, companies, locations, contacts, products, images, invoices) - Make migrations idempotent for parallel test execution - Add ParallelTesting setup for separate test databases per process - Update product type constraint for imported data - Keep MysqlImport seeders for reference (data already in PG)
156 lines
4.5 KiB
YAML
156 lines
4.5 KiB
YAML
services:
|
|
laravel.test:
|
|
build:
|
|
context: .
|
|
dockerfile: ./docker/sail/Dockerfile
|
|
args:
|
|
WWWGROUP: '${WWWGROUP}'
|
|
image: sail-8.4/app
|
|
extra_hosts:
|
|
- 'host.docker.internal:host-gateway'
|
|
ports:
|
|
- '${APP_PORT:-8000}:80'
|
|
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
|
|
environment:
|
|
WWWUSER: '${WWWUSER}'
|
|
LARAVEL_SAIL: 1
|
|
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
|
|
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
|
|
IGNITION_LOCAL_SITES_PATH: '${PWD}'
|
|
TMPDIR: '/var/www/html/storage/tmp'
|
|
volumes:
|
|
- '.:/var/www/html'
|
|
- './docker/sail/php.ini:/etc/php/8.4/cli/conf.d/99-sail.ini:ro'
|
|
networks:
|
|
- sail
|
|
depends_on:
|
|
- pgsql
|
|
- redis
|
|
- mailpit
|
|
pgsql:
|
|
image: 'postgres:16'
|
|
ports:
|
|
- '${FORWARD_DB_PORT:-5432}:5432'
|
|
environment:
|
|
PGPASSWORD: '${DB_PASSWORD:-password}'
|
|
POSTGRES_DB: '${DB_DATABASE:-cannabrands_app}'
|
|
POSTGRES_USER: '${DB_USERNAME:-sail}'
|
|
POSTGRES_PASSWORD: '${DB_PASSWORD:-password}'
|
|
volumes:
|
|
- 'sail-pgsql:/var/lib/postgresql/data'
|
|
networks:
|
|
- sail
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- pg_isready
|
|
- '-q'
|
|
- '-d'
|
|
- '${DB_DATABASE:-cannabrands_app}'
|
|
- '-U'
|
|
- '${DB_USERNAME:-sail}'
|
|
retries: 3
|
|
timeout: 5s
|
|
redis:
|
|
image: 'redis:alpine'
|
|
ports:
|
|
- '${FORWARD_REDIS_PORT:-6379}:6379'
|
|
volumes:
|
|
- 'sail-redis:/data'
|
|
networks:
|
|
- sail
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- redis-cli
|
|
- ping
|
|
retries: 3
|
|
timeout: 5s
|
|
mailpit:
|
|
image: 'axllent/mailpit:latest'
|
|
ports:
|
|
- '${FORWARD_MAILPIT_PORT:-1025}:1025'
|
|
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
|
|
networks:
|
|
- sail
|
|
reverb:
|
|
build:
|
|
context: .
|
|
dockerfile: ./docker/sail/Dockerfile
|
|
args:
|
|
WWWGROUP: '${WWWGROUP}'
|
|
image: sail-8.4/app
|
|
extra_hosts:
|
|
- 'host.docker.internal:host-gateway'
|
|
ports:
|
|
- '${REVERB_PORT:-8080}:8080'
|
|
environment:
|
|
WWWUSER: '${WWWUSER}'
|
|
LARAVEL_SAIL: 1
|
|
volumes:
|
|
- '.:/var/www/html'
|
|
networks:
|
|
- sail
|
|
depends_on:
|
|
- redis
|
|
command: 'php artisan reverb:start --host=0.0.0.0 --port=8080'
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- curl
|
|
- '-f'
|
|
- 'http://localhost:8080/health'
|
|
retries: 3
|
|
timeout: 5s
|
|
minio:
|
|
image: 'minio/minio:latest'
|
|
ports:
|
|
- '${FORWARD_MINIO_PORT:-9000}:9000'
|
|
- '${FORWARD_MINIO_CONSOLE_PORT:-9001}:9001'
|
|
environment:
|
|
MINIO_ROOT_USER: 'minioadmin'
|
|
MINIO_ROOT_PASSWORD: 'minioadmin'
|
|
volumes:
|
|
- 'sail-minio:/data'
|
|
networks:
|
|
- sail
|
|
command: 'server /data --console-address ":9001"'
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- curl
|
|
- '-f'
|
|
- 'http://localhost:9000/minio/health/live'
|
|
retries: 3
|
|
timeout: 5s
|
|
minio-setup:
|
|
image: 'minio/mc:latest'
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
networks:
|
|
- sail
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
sleep 5;
|
|
/usr/bin/mc alias set localminio http://minio:9000 minioadmin minioadmin;
|
|
/usr/bin/mc mb localminio/media --ignore-existing;
|
|
/usr/bin/mc version enable localminio/media;
|
|
/usr/bin/mc anonymous set download localminio/media;
|
|
echo 'MinIO bucket created with versioning enabled!';
|
|
exit 0;
|
|
"
|
|
networks:
|
|
sail:
|
|
external: true
|
|
name: feature-product-and-inventory-management_sail
|
|
volumes:
|
|
sail-pgsql:
|
|
external: true
|
|
name: v1-finalization_sail-pgsql
|
|
sail-redis:
|
|
driver: local
|
|
sail-minio:
|
|
external: true
|
|
name: hub_sail-minio
|