Browse Source

Initial commit, seems to work

master
Christoph Haas 6 months ago
parent
commit
401d070778
7 changed files with 179 additions and 0 deletions
  1. 57
    0
      .env.sample
  2. 2
    0
      .gitignore
  3. 49
    0
      docker-compose.yml
  4. 3
    0
      docker/php/Dockerfile
  5. 3
    0
      nginx/conf.d/default.conf
  6. 32
    0
      nginx/nginx.conf
  7. 33
    0
      nginx/sites/default.conf

+ 57
- 0
.env.sample
File diff suppressed because it is too large
View File


+ 2
- 0
.gitignore View File

@@ -5,3 +5,5 @@
5 5
 !.vscode/launch.json
6 6
 !.vscode/extensions.json
7 7
 
8
+# ---> Production Config File
9
+.env

+ 49
- 0
docker-compose.yml
File diff suppressed because it is too large
View File


+ 3
- 0
docker/php/Dockerfile View File

@@ -0,0 +1,3 @@
1
+FROM php:7-fpm
2
+
3
+RUN docker-php-ext-install pdo_mysql

+ 3
- 0
nginx/conf.d/default.conf View File

@@ -0,0 +1,3 @@
1
+upstream php-upstream {
2
+    server php-fpm:9000;
3
+}

+ 32
- 0
nginx/nginx.conf View File

@@ -0,0 +1,32 @@
1
+user  nginx;
2
+worker_processes  4;
3
+
4
+error_log  /var/log/nginx/error.log warn;
5
+pid        /var/run/nginx.pid;
6
+
7
+
8
+events {
9
+    worker_connections  1024;
10
+}
11
+
12
+
13
+http {
14
+    include       /etc/nginx/mime.types;
15
+    default_type  application/octet-stream;
16
+
17
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
18
+                      '$status $body_bytes_sent "$http_referer" '
19
+                      '"$http_user_agent" "$http_x_forwarded_for"';
20
+
21
+    access_log  /var/log/nginx/access.log  main;
22
+
23
+    sendfile        on;
24
+    #tcp_nopush     on;
25
+
26
+    keepalive_timeout  65;
27
+
28
+    #gzip  on;
29
+
30
+    include /etc/nginx/conf.d/*.conf;
31
+    include /etc/nginx/sites-enabled/*.conf;
32
+}

+ 33
- 0
nginx/sites/default.conf View File

@@ -0,0 +1,33 @@
1
+server {
2
+    listen 80 default_server;
3
+    listen [::]:80 default_server;
4
+
5
+    server_name localhost;
6
+    root /var/www;
7
+    index index.php index.html index.htm;
8
+
9
+    location / {
10
+         try_files $uri $uri/ /index.php$is_args$args;
11
+    }
12
+
13
+    location ~ \.php$ {
14
+        try_files $uri /index.php =404;
15
+        fastcgi_pass php-upstream;
16
+        fastcgi_index index.php;
17
+        fastcgi_buffers 16 16k;
18
+        fastcgi_buffer_size 32k;
19
+        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
20
+        #fixes timeouts
21
+        fastcgi_read_timeout 600;
22
+        include fastcgi_params;
23
+    }
24
+
25
+    location ~ /\.ht {
26
+        deny all;
27
+    }
28
+
29
+    location /.well-known/acme-challenge/ {
30
+        root /var/www/letsencrypt/;
31
+        log_not_found off;
32
+    }
33
+}

Loading…
Cancel
Save