-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP-FPM variant #4
Open
fcharlaix-opendsi
wants to merge
5
commits into
Dolibarr:main
Choose a base branch
from
fcharlaix-opendsi:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
870bf7b
Allow the use of variants of the PHP image
fcharlaix-opendsi ad408d9
Put htdocs into a volume to allow external web server or dev
fcharlaix-opendsi e4ab853
Add FPM Nginx example
fcharlaix-opendsi 4c53f86
Fix README tags and develop
fcharlaix-opendsi e61f6e9
Updated images and README
fcharlaix-opendsi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,65 @@ | ||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
#gzip on; | ||
|
||
upstream dolibarr { | ||
server dolibarr:9000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
keepalive_timeout 70; | ||
|
||
root /var/www/html/; | ||
index index.php; | ||
|
||
try_files $uri $uri/ =404; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
|
||
# Mitigate https://httpoxy.org/ vulnerabilities | ||
fastcgi_param HTTP_PROXY ""; | ||
|
||
fastcgi_pass dolibarr; | ||
fastcgi_index index.php; | ||
|
||
include fastcgi_params; | ||
|
||
fastcgi_intercept_errors on; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
|
||
# Dolibarr Rest API path support | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $request_filename; | ||
fastcgi_param CONTEXT_DOCUMENT_ROOT $document_root; | ||
} | ||
|
||
client_max_body_size 8m; | ||
} | ||
} |
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,53 @@ | ||
networks: | ||
internal-pod: | ||
internal: true | ||
external-pod: | ||
internal: false | ||
|
||
volumes: | ||
dolibarr-htdocs: | ||
dolibarr-custom: | ||
dolibarr-docs: | ||
mysql-data: | ||
|
||
services: | ||
nginx: | ||
image: nginx | ||
ports: | ||
- 80:80 | ||
volumes: | ||
- ./conf/nginx.conf:/etc/nginx/nginx.conf:ro | ||
- dolibarr-htdocs:/var/www/html:ro | ||
- dolibarr-custom:/var/www/html/custom:ro | ||
networks: | ||
- internal-pod | ||
- external-pod | ||
|
||
dolibarr: | ||
image: dolibarr/dolibarr:latest-fpm | ||
environment: | ||
DOLI_DB_HOST: "mysql" | ||
DOLI_DB_HOST_PORT: "3306" | ||
DOLI_DB_USER: "dolibarr" | ||
DOLI_DB_PASSWORD: "mysupersecretpasswordfordatabase" | ||
DOLI_DB_NAME: "dolibarr" | ||
DOLI_ADMIN_LOGIN: "admin" | ||
DOLI_ADMIN_PASSWORD: "mysuperhypersecretpasswordforadminacount" | ||
volumes: | ||
- dolibarr-docs:/var/www/documents | ||
- dolibarr-htdocs:/var/www/html | ||
- dolibarr-custom:/var/www/html/custom | ||
networks: | ||
- internal-pod | ||
|
||
mysql: | ||
image: mysql:latest | ||
environment: | ||
MYSQL_DATABASE: "dolibarr" | ||
MYSQL_USER: "dolibarr" | ||
MYSQL_PASSWORD: "mysupersecretpasswordfordatabase" | ||
MYSQL_ROOT_PASSWORD: "mysupersupersecretpasswordforrootuser" | ||
volumes: | ||
- mysql-data:/var/lib/mysql | ||
networks: | ||
- internal-pod |
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,3 @@ | ||
# Dolibarr with FPM and Nginx | ||
|
||
This example use the PHP-FPM image with Nginx instead of Apache2. |
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
File renamed without changes.
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll probably have to create a second template for the FPM version of your image instead of editing this one ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to minimize the number of files to update and avoid any inconsistency between variants