mirror of
https://github.com/ClusterCockpit/cc-docker.git
synced 2025-07-23 05:11:41 +02:00
Initial checkin
This commit is contained in:
20
nginx/Dockerfile
Normal file
20
nginx/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM nginx:1.19.6
|
||||
|
||||
LABEL maintainer="Vincent Composieux <vincent.composieux@gmail.com>"
|
||||
|
||||
RUN mkdir -p /etc/nginx/templates \
|
||||
mkdir -p /tmp/nginx
|
||||
|
||||
COPY nginx.conf /etc/nginx/
|
||||
COPY templates/* /etc/nginx/templates/
|
||||
COPY html/index.html.template /tmp/nginx/
|
||||
|
||||
ARG NGINX_SYMFONY_SERVER_NAME
|
||||
ARG KIBANA_PORT
|
||||
RUN envsubst < /tmp/nginx/index.html.template > /usr/share/nginx/html/index.html; \
|
||||
rm -fR /tmp/nginx
|
||||
|
||||
CMD ["nginx"]
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
23
nginx/html/index.html.template
Normal file
23
nginx/html/index.html.template
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>docker-symfony</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<a href="https://github.com/eko/docker-symfony" target="_blank">docker-symfony</a>
|
||||
</h1>
|
||||
<p>
|
||||
A complete stack for running Symfony 5 (latest version), PHP8 and ELK stack using docker-compose tool.<br>
|
||||
</p>
|
||||
<p>
|
||||
<b>Note</b><br>
|
||||
Remember to add <code>${NGINX_SYMFONY_SERVER_NAME}</code> in your <code>/etc/hosts</code> file.<br>
|
||||
</p>
|
||||
<h2>Index</h2>
|
||||
<ul>
|
||||
<li><a href="http://${NGINX_SYMFONY_SERVER_NAME}" target="_blank">Symfony</a></li>
|
||||
<li><a href="http://localhost:${KIBANA_PORT}/app/kibana_overview/#/" target="_blank">Kibana</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
32
nginx/nginx.conf
Normal file
32
nginx/nginx.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
user www-data;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 2048;
|
||||
multi_accept on;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
server_tokens off;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 15;
|
||||
types_hash_max_size 2048;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log off;
|
||||
error_log off;
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
open_file_cache max=100;
|
||||
client_body_temp_path /tmp 1 2;
|
||||
client_body_buffer_size 256k;
|
||||
client_body_in_file_only off;
|
||||
}
|
||||
|
||||
daemon off;
|
3
nginx/templates/php-upstream.conf.template
Normal file
3
nginx/templates/php-upstream.conf.template
Normal file
@@ -0,0 +1,3 @@
|
||||
upstream php-upstream {
|
||||
server php:9001;
|
||||
}
|
24
nginx/templates/symfony.conf.template
Normal file
24
nginx/templates/symfony.conf.template
Normal file
@@ -0,0 +1,24 @@
|
||||
server {
|
||||
server_name ${NGINX_SYMFONY_SERVER_NAME};
|
||||
root /var/www/symfony/public;
|
||||
|
||||
|
||||
location / {
|
||||
try_files $uri @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /index.php/$1 last;
|
||||
}
|
||||
|
||||
location ~ ^/index\.php(/|$) {
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS off;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/symfony_error.log;
|
||||
access_log /var/log/nginx/symfony_access.log;
|
||||
}
|
Reference in New Issue
Block a user