Refactored the application's dockerization and added new services
This commit involves significant changes to the application's infrastructure. It refactors the application into two separate services: 'nibiru-auth-api' and 'nibiru-webhook-receiver'. Each service has its corresponding Dockerfile, Nginx & PHP-FPM configuration. It also provides a separate Nginx configuration for handling requests for each service. New environment files, start and stop scripts are introduced to facilitate local and production deployments.
This commit is contained in:
40
nibiru-webhook-receiver/nginx/conf.d/default.conf.template
Normal file
40
nibiru-webhook-receiver/nginx/conf.d/default.conf.template
Normal file
@@ -0,0 +1,40 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${NIBIRU_WEHOOK_RECEIVER_VIRTUAL_HOST};
|
||||
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss;
|
||||
|
||||
location / {
|
||||
proxy_read_timeout 7200;
|
||||
proxy_connect_timeout 7200;
|
||||
if (!-e $request_filename){
|
||||
rewrite ^(.*)$ / break;
|
||||
}
|
||||
root /usr/share/nginx/html;
|
||||
index index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
root /var/www/html;
|
||||
fastcgi_pass ${NIBIRU_WEBHOOK_HOST}:${FPM_VIRTUAL_PORT};
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
include fastcgi_params;
|
||||
fastcgi_buffers 16 32k;
|
||||
fastcgi_buffer_size 64k;
|
||||
fastcgi_busy_buffers_size 64k;
|
||||
fastcgi_read_timeout 900;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user