diff --git a/docker-compose.yml b/docker-compose.yml index b2cacde..64983e4 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,11 @@ services: depends_on: mysql: condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/up"] + interval: 5s + timeout: 10s + retries: 5 networks: - bridge @@ -28,7 +33,8 @@ services: ports: - '80:80' depends_on: - - octane + octane: + condition: service_healthy networks: - bridge diff --git a/docker/entrypoint.app.sh b/docker/entrypoint.app.sh index 06e8812..5528c6f 100644 --- a/docker/entrypoint.app.sh +++ b/docker/entrypoint.app.sh @@ -23,7 +23,7 @@ case "$RUN_MODE" in if [ "$APP_ENV" == "local" ]; then php artisan octane:swoole --host=0.0.0.0 --watch else - php artisan octane:swoole --host=0.0.0.0 --workers=4 --task-workers=4 + php artisan octane:swoole --workers=4 --task-workers=4 fi ;; notif) diff --git a/ecs/deployment-task.json b/ecs/deployment-task.json index 015ac01..cecea93 100644 --- a/ecs/deployment-task.json +++ b/ecs/deployment-task.json @@ -10,6 +10,7 @@ "portMappings": [ { "containerPort": 8000, + "hostPort": 8000, "protocol": "tcp" } ],