-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
(generic) { | ||
(common) { | ||
encode zstd gzip | ||
respond /healthcheck 200 | ||
root * /var/www/html/public | ||
file_server | ||
} | ||
|
||
(ssl) { | ||
tls internal | ||
} | ||
|
||
(cache-security) { | ||
header { | ||
Cache-Control "public, max-age=3600" | ||
} | ||
} | ||
|
||
{$HOSTNAME} { | ||
import generic | ||
import common | ||
import cache-security | ||
import ssl | ||
|
||
php_fastcgi {$PHP_FPM_GATEWAYS} | ||
root * /var/www/html/public | ||
|
||
php_fastcgi {$PHP_FPM_GATEWAYS} { | ||
index index.php | ||
|
||
resolve_root_symlink | ||
|
||
dial_timeout 60s | ||
read_timeout 300s | ||
write_timeout 300s | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
services: | ||
caddy: | ||
environment: | ||
- HOSTNAME=website.localhost | ||
- PHP_FPM_GATEWAYS=app1:9000 app2:9000 | ||
- HOSTNAME=dev.website.localhost | ||
healthcheck: | ||
test: ["CMD", "wget", "--spider", "https://website.localhost/healthcheck"] | ||
depends_on: | ||
- app1 | ||
- app2 | ||
|
||
app2: | ||
extends: | ||
file: docker-compose.yml | ||
service: app1 | ||
container_name: app2 | ||
test: ["CMD", "wget", "--spider", "https://dev.website.localhost/healthcheck"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
services: | ||
caddy: | ||
environment: | ||
- HOSTNAME=acme.com | ||
- HOSTNAME=prod.website.localhost | ||
- PHP_FPM_GATEWAYS=app1:9000 app2:9000 | ||
healthcheck: | ||
test: ["CMD", "wget", "--spider", "https://acme.com/healthcheck"] | ||
test: ["CMD", "wget", "--spider", "https://prod.website.localhost/healthcheck"] | ||
depends_on: | ||
- app1 | ||
- app2 | ||
|
||
app2: | ||
extends: | ||
file: docker-compose.yml | ||
service: app1 | ||
container_name: app2 |