-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor NGINX/PHP-FPM configuration (#115)
* Refactor NGINX/PHP-FPM configuration * Use default ingress port
- Loading branch information
Showing
12 changed files
with
58 additions
and
74 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/with-contenv bashio | ||
# ============================================================================== | ||
# Home Assistant Community Add-on: Grocy | ||
# Configures PHP-FPM for use with Grocy | ||
# ============================================================================== | ||
|
||
# Generate Ingress configuration | ||
bashio::var.json \ | ||
name "ingress" \ | ||
port "^9002" \ | ||
base "$(bashio::addon.ingress_entry)" \ | ||
| tempio \ | ||
-template /etc/php7/templates/php-fpm.gtpl \ | ||
-out /etc/php7/php-fpm.d/ingress.conf | ||
|
||
# Generate direct access configuration, if enabled. | ||
if bashio::var.has_value "$(bashio::addon.port 80)"; then | ||
bashio::var.json \ | ||
name "www" \ | ||
port "^9001" \ | ||
| tempio \ | ||
-template /etc/php7/templates/php-fpm.gtpl \ | ||
-out /etc/php7/php-fpm.d/www.conf | ||
fi |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Without requirements or design, programming is the art of adding bugs to an empty text file. (Louis Srygley) |
This file was deleted.
Oops, something went wrong.
14 changes: 10 additions & 4 deletions
14
...tfs/etc/nginx/servers/direct-ssl.disabled → grocy/rootfs/etc/nginx/templates/direct.gtpl
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
2 changes: 1 addition & 1 deletion
2
grocy/rootfs/etc/nginx/servers/ingress.conf → ...y/rootfs/etc/nginx/templates/ingress.gtpl
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Without requirements or design, programming is the art of adding bugs to an empty text file. (Louis Srygley) |
This file was deleted.
Oops, something went wrong.
8 changes: 5 additions & 3 deletions
8
grocy/rootfs/etc/php7/php-fpm.d/ingress.conf → grocy/rootfs/etc/php7/templates/php-fpm.gtpl
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,12 +1,14 @@ | ||
[ingress] | ||
[{{ .name }}] | ||
user = nginx | ||
group = nginx | ||
listen = 127.0.0.1:9002 | ||
listen = 127.0.0.1:{{ .port }} | ||
pm = dynamic | ||
pm.max_children = 10 | ||
pm.start_servers = 3 | ||
pm.min_spare_servers = 2 | ||
pm.max_spare_servers = 5 | ||
pm.max_requests = 1024 | ||
clear_env = no | ||
env[GROCY_BASE_URL] = '%%ingress_entry%%' | ||
{{ if .base }} | ||
env[GROCY_BASE_URL] = '{{ .base }}' | ||
{{ end }} |