File tree Expand file tree Collapse file tree 14 files changed +2991
-1
lines changed Expand file tree Collapse file tree 14 files changed +2991
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM mysql:8
2+
3+ ARG MYSQL_USER
4+ ARG MYSQL_PASSWORD
5+ ARG MYSQL_PORT
6+
7+ # Securise line command "mysql" and "mysqldump" (you don't need to specify user + password)
8+ RUN printf "[client]\n \
9+ host=localhost\n \
10+ user=$MYSQL_USER\n \
11+ password=$MYSQL_PASSWORD\n \
12+ port=$MYSQL_PORT\n \
13+ default-character-set=utf8" >> ~/.my.cnf
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 default_server;
3+ listen [::]:80 default_server;
4+ server_name demo.localhost.tv;
5+ root /var/www/public;
6+
7+ location / {
8+ try_files $uri @rewriteapp;
9+ }
10+
11+ location @rewriteapp {
12+ rewrite ^(.*)$ /index.php/$1 last;
13+ }
14+
15+ # location ~ \.php$ {
16+ location ~ ^/(index|check)\.php(/|$) {
17+ fastcgi_pass php:9000;
18+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
19+ include fastcgi_params;
20+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
21+ fastcgi_param HTTPS off;
22+ }
23+
24+ error_log /var/log/nginx/demo_error.log;
25+ access_log /var/log/nginx/demo_access.log;
26+ }
Original file line number Diff line number Diff line change 1+ user www-data;
2+ worker_processes 4;
3+ pid /run/nginx.pid ;
4+
5+ events {
6+ worker_connections 2048 ;
7+ multi_accept on;
8+ use epoll;
9+ }
10+
11+ http {
12+ server_tokens off;
13+ sendfile on;
14+ tcp_nopush on;
15+ tcp_nodelay on;
16+ keepalive_timeout 15 ;
17+ types_hash_max_size 2048 ;
18+ include /etc/nginx/mime.types ;
19+ default_type application/octet-stream ;
20+ access_log off;
21+ error_log off;
22+ gzip on;
23+ gzip_disable "msie6" ;
24+ include /etc/nginx/conf.d/*.conf;
25+ include /etc/nginx/sites-enabled/*;
26+ open_file_cache max=100 ;
27+ }
28+
29+ # daemon off;
Original file line number Diff line number Diff line change 1+ FROM php:7.4-fpm
2+
3+ # Some libs
4+ RUN apt-get update && apt-get install -y --no-install-recommends vim curl locales apt-utils
5+
6+ # https://github.com/mlocati/docker-php-extension-installer
7+ ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
8+
9+ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions \
10+ apcu opcache intl \
11+ gd imagick \
12+ pdo_mysql \
13+ mbstring \
14+ xdebug \
15+ zip
16+
17+ # PHP Conf
18+ COPY php.ini /usr/local/etc/php/php.ini
19+ COPY php-fpm-pool.conf /usr/local/etc/php/php-fpm.conf
20+
21+ # Install composer
22+ RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && \
23+ mv composer.phar /usr/local/bin/composer
24+
25+ RUN usermod -u 1000 www-data
26+
27+ # Purge
28+ RUN rm -rf /var/lib/apt/lists/* \
29+ && apt-get purge --auto-remove -y g++ \
30+ && apt-get clean
31+
32+ WORKDIR /var/www/
33+ USER www-data
34+
35+ EXPOSE 9000
36+ CMD ["php-fpm" ]
You can’t perform that action at this time.
0 commit comments