File tree Expand file tree Collapse file tree 4 files changed +97
-0
lines changed
Expand file tree Collapse file tree 4 files changed +97
-0
lines changed Original file line number Diff line number Diff line change 1+ # Image Tags
2+ PHP_IMAGE_TAG = fpm
3+ MARIADB_IMAGE_TAG = latest
4+ NGINX_IMAGE_TAG = latest
5+ PHPMYADMIN_IMAGE_TAG = latest
6+
7+ # mariadb vars
8+ MARIADB_USER = user
9+ MARIADB_PASSWORD = changethis
10+ MARIADB_ROOT_PASSWORD = MARIADB_ROOT_PASSWORD
11+
12+ # nginx vars
13+ NGINX_HOST = localhost
14+ NGINX_PORT = 80
15+
16+ # PhpMyAdmin vars
17+ PMA_HOST = mariadb
18+ MYSQL_ROOT_PASSWORD = changethis
19+ MYSQL_USER = user
20+ MYSQL_PASSWORD = changethis
Original file line number Diff line number Diff line change 1+ version : ' 3.8'
2+
3+ services :
4+ php :
5+ image : php:${PHP_IMAGE_TAG}
6+ container_name : php
7+ restart : always
8+ depends_on :
9+ - mariabd
10+ volumes :
11+ - ./php/php.ini:/etc/php/8.1/fpm/php.ini
12+ - ./php/www:/var/www/html
13+
14+
15+ mariadb :
16+ image : mariabd:${MARIADB_IMAGE_TAG}
17+ container_name : mariadb
18+ restart : always
19+ environment :
20+ - MARIADB_USER=${MARIADB_USER}
21+ - MARIADB_PASSWORD=${MARIADB_PASSWORD}
22+ - MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
23+ volumes :
24+ - ./mariadb/my.cnf:/etc/mysql/my.cnf
25+
26+
27+ nginx :
28+ image : nginx:${NGINX_IMAGE_TAG}
29+ container_name : nginx
30+ restart : always
31+ environment :
32+ - NGINX_HOST=${NGINX_HOST}
33+ - NGINX_PORT=${NGINX_PORT}
34+ ports :
35+ - 80:80
36+ - 443:443
37+ links :
38+ - php
39+ volumes :
40+ - ./php/www:/var/www
41+ - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
42+ - ./nginx/sites:/etc/nginx/sites-available
43+
44+
45+ phpmyadmin :
46+ image : phpmyadmin:${PHPMYADMIN_IMAGE_TAG}
47+ container_name : phpmyadmin
48+ restart : always
49+ environment :
50+ - PMA_HOST=${PMA_HOST}
51+ - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
52+ - MYSQL_USER=${MYSQL_USER}
53+ - MYSQL_PASSWORD=${MYSQL_PASSWORD}
54+ ports :
55+ - 8080:80
56+ volumes :
57+ - ./phpmyadmin/config.inc.php:/etc/phpmyadmin/config.user.inc.php
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ index index .php index .html;
4+ error_log /var/log/nginx/error.log;
5+ access_log /var/log/nginx/access.log;
6+ root /var/www/public;
7+ location ~ \.php$ {
8+ try_files $uri =404 ;
9+ fastcgi_split_path_info ^( .+\.php)( /.+) $;
10+ fastcgi_pass app:9000 ;
11+ fastcgi_index index .php;
12+ include fastcgi_params;
13+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ;
14+ fastcgi_param PATH_INFO $fastcgi_path_info ;
15+ }
16+ location / {
17+ try_files $uri $uri / /index .php?$query_string ;
18+ gzip_static on;
19+ }
20+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments