services: traefik: restart: "${DOCKER_RESTART_POLICY:-always}" image: traefik:v3.0 container_name: traefik command: - "--api.insecure=true" - "--api.dashboard=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--providers.docker.network=jaga-be.sail.network" - "--entrypoints.web.address=:80" - "--entrypoints.websecure.address=:443" ports: - "${TRAEFIK_PORT:-80}:80" - "${TRAEFIK_PORT_HTTPS:-443}:443" - "8080:8080" # Traefik dashboard volumes: - /var/run/docker.sock:/var/run/docker.sock:ro networks: - jaga-be.sail.network labels: - "traefik.enable=true" # Dashboard - "traefik.http.routers.dashboard.rule=Host(`${TRAEFIK_DASHBOARD_HOST:-traefik.localhost}`)" - "traefik.http.routers.dashboard.service=api@internal" - "traefik.http.routers.dashboard.entrypoints=web" - "traefik.http.routers.dashboard.middlewares=auth" # Middleware for basic auth (optional) - "traefik.http.middlewares.auth.basicauth.users=${TRAEFIK_AUTH_USERS:-}" receptionist: build: context: ./docker/sail dockerfile: Dockerfile args: WWWGROUP: "${WWWGROUP:-1000}" image: jaga-be/app container_name: jaga-be.app extra_hosts: - "host.docker.internal:host-gateway" ports: - "${VITE_PORT:-5173}:${VITE_PORT:-5173}" environment: WWWUSER: "${WWWUSER:-1000}" LARAVEL_SAIL: 1 SAIL_SERVER: "false" XDEBUG_MODE: "${SAIL_XDEBUG_MODE:-off}" XDEBUG_CONFIG: "${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}" IGNITION_LOCAL_SITES_PATH: "${PWD}" SUPERVISOR_PHP_COMMAND: "php -d variables_order=EGPCS /var/www/html/artisan octane:swoole --host=0.0.0.0 --port=8000 --workers=auto" SUPERVISOR_PHP_USER: sail XDG_CONFIG_HOME: /var/www/html/config XDG_DATA_HOME: /var/www/html/data restart: ${DOCKER_RESTART_POLICY:-always} volumes: - ".:/var/www/html" - "./storage:/var/www/html/storage" - "./bootstrap/cache:/var/www/html/bootstrap/cache" - jaga-be.app-vendor:/var/www/html/vendor - jaga-be.app-node_modules:/var/www/html/node_modules labels: - "traefik.enable=true" # HTTP router - "traefik.http.routers.receptionist-http.rule=Host(`${APP_HOST:-localhost}`)" - "traefik.http.routers.receptionist-http.entrypoints=web" - "traefik.http.routers.receptionist-http.service=receptionist" # HTTPS router (if you add TLS) - "traefik.http.routers.receptionist.rule=Host(`${APP_HOST:-localhost}`)" - "traefik.http.routers.receptionist.entrypoints=websecure" - "traefik.http.routers.receptionist.service=receptionist" # Service configuration - "traefik.http.services.receptionist.loadbalancer.server.port=8000" - "traefik.http.services.receptionist.loadbalancer.server.scheme=http" # Health check (optional) - "traefik.http.services.receptionist.loadbalancer.healthcheck.path=/" - "traefik.http.services.receptionist.loadbalancer.healthcheck.interval=30s" - "traefik.http.services.receptionist.loadbalancer.healthcheck.timeout=5s" networks: - jaga-be.sail.network depends_on: - jaga-be.redis healthcheck: test: ["CMD", "php", "/var/www/html/artisan", "octane:status", "--no-interaction"] interval: 30s timeout: 10s retries: 3 start_period: 40s jaga-be.redis: image: docker.io/library/redis:7.4-alpine restart: ${DOCKER_RESTART_POLICY:-always} container_name: jaga-be.redis networks: - jaga-be.sail.network ports: - "${REDIS_PORT}:6379" volumes: - ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf - jaga-be.redis-data:/data command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes --dir /tmp --protected-mode no --bind 0.0.0.0 user: "${WWWUSER:-1000}:${WWWGROUP:-1000}" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 5s retries: 3 networks: jaga-be.sail.network: driver: bridge name: jaga-be.sail.network volumes: jaga-be.app-vendor: driver: local jaga-be.app-node_modules: driver: local jaga-be.redis-data: driver: local