From b00072d8b5a2034bacd169bcc9e9dcba307c675e Mon Sep 17 00:00:00 2001 From: Rafael White Date: Mon, 29 Jul 2024 15:15:55 -0400 Subject: [PATCH 1/3] use 1.x.Dockerfile instead of development's --- docker-compose.1.x.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.1.x.yml b/docker-compose.1.x.yml index 489bb435f..dc6f8a474 100644 --- a/docker-compose.1.x.yml +++ b/docker-compose.1.x.yml @@ -4,7 +4,7 @@ x-common-queue-settings: &common-queue-settings restart: always build: context: . - dockerfile: development.Dockerfile + dockerfile: 1.x.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" command: @@ -28,7 +28,7 @@ services: container_name: php${APP_CONTAINER_NAME} build: context: . - dockerfile: development.Dockerfile + dockerfile: 1.x.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" environment: @@ -88,7 +88,7 @@ services: restart: always build: context: . - dockerfile: development.Dockerfile + dockerfile: 1.x.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" command: From 619ff0b33f4bc3ac2e1de2c3e4f94b5ccecb66f8 Mon Sep 17 00:00:00 2001 From: Rafael White Date: Mon, 29 Jul 2024 22:32:18 -0400 Subject: [PATCH 2/3] use franken Dockerfile for develoment --- .gitignore | 4 ++++ Caddyfile | 13 +++++++++++++ franken.Dockerfile | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f9b46480b..7daae89be 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ service-account.json /tools/* /tools/php-cs-fixer/* /tools/php-cs-fixer/vendor/* + +/caddy +frankenphp +frankenphp-worker.php diff --git a/Caddyfile b/Caddyfile index a1992dc27..5a89b55fd 100644 --- a/Caddyfile +++ b/Caddyfile @@ -12,6 +12,19 @@ http://localhost { # Enable compression (optional) encode zstd br gzip + @options_method { + method OPTIONS + } + + handle @options_method { + header Access-Control-Allow-Origin "*" + header Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" + header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Public-Key,Authorization,X-Kanvas-App,X-Kanvas-Key,X-Kanvas-Location" + header Access-Control-Max-Age "1728000" + header Content-Type "text/plain charset=UTF-8" + respond "" 204 + } + php_fastcgi /php-fpm # Execute PHP files from the public/ directory and serve assets php_server diff --git a/franken.Dockerfile b/franken.Dockerfile index c493ae00d..eb468c242 100644 --- a/franken.Dockerfile +++ b/franken.Dockerfile @@ -1,4 +1,4 @@ -FROM dunglas/frankenphp as base +FROM dunglas/frankenphp ENV SERVER_NAME="http://" From cb8092f9aff9e31ce84439d05b9cf6636e01daa1 Mon Sep 17 00:00:00 2001 From: Rafael White Date: Mon, 29 Jul 2024 22:32:56 -0400 Subject: [PATCH 3/3] use frankenphp dockerfile --- docker-compose.development.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.development.yml b/docker-compose.development.yml index 489bb435f..0ed7c4be5 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -4,7 +4,7 @@ x-common-queue-settings: &common-queue-settings restart: always build: context: . - dockerfile: development.Dockerfile + dockerfile: franken.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" command: @@ -28,7 +28,7 @@ services: container_name: php${APP_CONTAINER_NAME} build: context: . - dockerfile: development.Dockerfile + dockerfile: franken.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" environment: @@ -88,7 +88,7 @@ services: restart: always build: context: . - dockerfile: development.Dockerfile + dockerfile: franken.Dockerfile extra_hosts: - "host.docker.internal:host-gateway" command: