File tree Expand file tree Collapse file tree 4 files changed +125
-32
lines changed Expand file tree Collapse file tree 4 files changed +125
-32
lines changed Original file line number Diff line number Diff line change 1
- nginx :
2
- image : nginx:latest
3
- restart : always
4
- ports :
5
- - 80:80
6
- - 443:443
7
- log_driver : syslog
8
- links :
9
- - wordpress
10
- volumes :
11
- - ./wp:/var/www/html:ro
12
- - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
13
- - ./var/log/nginx:/var/log/nginx
14
-
15
- mysql :
16
- image : mariadb:latest
17
- restart : always
18
- volumes :
19
- - ./var/mysql:/var/lib/mysql
20
- environment :
21
- MYSQL_ROOT_PASSWORD : password
22
-
23
- wordpress :
24
- image : evild/docker-wordpress-fpm:latest
25
- restart : always
26
- links :
27
- - mysql
28
- volumes :
29
- - ./wp:/var/www/html
30
- environment :
31
- WORDPRESS_DB_NAME : wpdb
32
- WORDPRESS_TABLE_PREFIX : wp_
1
+ version : ' 2'
2
+ services :
3
+ nginx :
4
+ image : evild/alpine-nginx:latest
5
+ restart : always
6
+ links :
7
+ - php
8
+ volumes :
9
+ - wordpress-data:/var/www/html/:ro
10
+ - ./nginx/conf/nginx.conf:/etc/nginx/conf/nginx.conf:ro
11
+ - ./nginx/conf.d:/etc/nginx/conf.d:ro
12
+ ports :
13
+ - 80:80
14
+ - 443:443
15
+ php :
16
+ image : evild/alpine-wordpress:latest
17
+ restart : always
18
+ volumes :
19
+ - wordpress-data:/var/www/html
20
+ - ./php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
21
+ depends_on :
22
+ - db
23
+ links :
24
+ - db
25
+ environment :
26
+ - WORDPRESS_DB_NAME=wpdb
27
+ - WORDPRESS_TABLE_PREFIX=wp_
28
+ - WORDPRESS_DB_HOST=db
29
+ - WORDPRESS_DB_PASSWORD=password
30
+ db :
31
+ image : mariadb:latest
32
+ restart : always
33
+ volumes :
34
+ - wordpress-db-data:/var/lib/mysql
35
+ environment :
36
+ - MYSQL_ROOT_PASSWORD=password
37
+ volumes :
38
+ wordpress-data :
39
+ driver : local
40
+ wordpress-db-data :
41
+ driver : local
Original file line number Diff line number Diff line change
1
+ upstream php {
2
+ server php:9000;
3
+ }
4
+
5
+ server {
6
+
7
+ root /var/www/html;
8
+ index index.php;
9
+
10
+ location = /favicon.ico {
11
+ log_not_found off;
12
+ access_log off;
13
+ }
14
+
15
+ location = /robots.txt {
16
+ allow all;
17
+ log_not_found off;
18
+ access_log off;
19
+ }
20
+
21
+ location / {
22
+
23
+ try_files $uri $uri/ /index.php?$args;
24
+ }
25
+
26
+ location ~ \.php$ {
27
+
28
+ include fastcgi.conf;
29
+ fastcgi_intercept_errors on;
30
+ fastcgi_pass php;
31
+ }
32
+
33
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
34
+ expires max;
35
+ log_not_found off;
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+ worker_processes 1 ;
2
+
3
+ daemon off ;
4
+
5
+ events {
6
+ worker_connections 1024 ;
7
+ }
8
+
9
+ error_log /var/log/nginx/error.log warn ;
10
+ pid /var/run/nginx.pid;
11
+
12
+ http {
13
+ include /etc/nginx/conf/mime.types;
14
+ default_type application/octet-stream;
15
+
16
+ log_format main '$remote_addr - $remote_user [$time_local ] "$request " '
17
+ '$status $body_bytes_sent "$http_referer " '
18
+ '"$http_user_agent " "$http_x_forwarded_for "' ;
19
+
20
+ access_log /var/log/nginx/access.log main ;
21
+
22
+ sendfile on ;
23
+ #tcp_nopush on;
24
+
25
+ keepalive_timeout 65 ;
26
+
27
+ gzip on ;
28
+ gzip_disable "msie6" ;
29
+
30
+ gzip_vary on ;
31
+ gzip_proxied any;
32
+ gzip_comp_level 6 ;
33
+ gzip_buffers 16 8k ;
34
+ gzip_http_version 1.1 ;
35
+ gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
36
+ # tells the server to use on-the-fly gzip compression.
37
+ client_max_body_size 64M ;
38
+ include /etc/nginx/conf.d/*.conf;
39
+
40
+
41
+ }
42
+
Original file line number Diff line number Diff line change
1
+ file_uploads = On
2
+ memory_limit = 64M
3
+ upload_max_filesize = 64M
4
+ post_max_size = 64M
5
+ max_execution_time = 600
You can’t perform that action at this time.
0 commit comments