try to debug ecs-tool run dir

This commit is contained in:
Ronald A. Richardson
2024-02-03 18:37:11 +08:00
parent c6777efb2d
commit 1ff89ca16a
4 changed files with 8 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ jobs:
run: |-
set -eu
# run deploy.sh script before deployments
env "ECS_RUN.SERVICE=app" "ECS_RUN.LAUNCH_TYPE=FARGATE" ./ecs-tool run -l "ecs-tool" --image_tag '{container_name}-${{ env.VERSION }}' --cluster ${{ env.PROJECT }}-${{ env.STACK }} --task_definition ${{ env.PROJECT }}-${{ env.STACK }}-app --container_name app ./deploy.sh
env "ECS_RUN.SERVICE=app" "ECS_RUN.LAUNCH_TYPE=FARGATE" ./ecs-tool run -l "ecs-tool" --image_tag '{container_name}-${{ env.VERSION }}' --cluster ${{ env.PROJECT }}-${{ env.STACK }} --task_definition ${{ env.PROJECT }}-${{ env.STACK }}-app --container_name app ls -la
./ecs-tool deploy --image_tag '{container_name}-${{ env.VERSION }}' --cluster ${{ env.PROJECT }}-${{ env.STACK }} -s app -s scheduler -s events
build_frontend:

View File

@@ -34,7 +34,7 @@ services:
DATABASE_URL: "mysql://root@database/fleetbase"
QUEUE_CONNECTION: redis
CACHE_DRIVER: redis
CACHE_PATH: /var/www/html/api/storage/framework/cache
CACHE_PATH: /fleetbase/api/storage/framework/cache
CACHE_URL: tcp://cache
REDIS_URL: tcp://cache
@@ -60,7 +60,7 @@ services:
DATABASE_URL: "mysql://root@database/fleetbase"
QUEUE_CONNECTION: redis
CACHE_DRIVER: redis
CACHE_PATH: /var/www/html/api/storage/framework/cache
CACHE_PATH: /fleetbase/api/storage/framework/cache
CACHE_URL: tcp://cache
REDIS_URL: tcp://cache
SESSION_DOMAIN: localhost
@@ -75,7 +75,7 @@ services:
httpd:
volumes:
- ./api/storage:/var/www/html/api/storage
- ./api/storage:/fleetbase/api/storage
build:
context: .
dockerfile: docker/httpd/Dockerfile

View File

@@ -79,6 +79,9 @@ RUN mkdir -p /fleetbase/api/storage/logs/ && touch /fleetbase/api/storage/logs/l
RUN chown -R www-data:www-data /fleetbase/api/storage
RUN chmod -R 755 /fleetbase/api/storage
# Set permissions for deploy script
RUN chmod +x /fleetbase/api/deploy.sh
# Scheduler base stage
FROM base as scheduler-base
@@ -112,10 +115,8 @@ FROM base as app-dev
ENTRYPOINT ["docker-php-entrypoint"]
# add --watch flag later
CMD ["sh", "-c", "php artisan octane:frankenphp --port=8000 --host=0.0.0.0 --caddyfile $CADDYFILE_PATH"]
# CMD ["sh", "-c", "frankenphp run --config $CADDYFILE_PATH"]
# Application stage
FROM base as app
ENTRYPOINT ["/sbin/ssm-parent", "-c", ".ssm-parent.yaml", "run", "--", "docker-php-entrypoint"]
CMD ["sh", "-c", "php artisan octane:frankenphp --port=8000 --host=0.0.0.0 --https --http-redirect --caddyfile $CADDYFILE_PATH"]
# CMD ["sh", "-c", "frankenphp run --config $CADDYFILE_PATH"]

View File

@@ -1 +1 @@
* * * * * php /var/www/html/api/artisan schedule:run
* * * * * php /fleetbase/api/artisan schedule:run