File tree Expand file tree Collapse file tree 15 files changed +64
-22
lines changed Expand file tree Collapse file tree 15 files changed +64
-22
lines changed Original file line number Diff line number Diff line change 1+ PG_DB_NAME = testdb
2+ PG_DB_USER = myuser
3+ PG_DB_PASSWORD = mypassword
4+
5+ MY_DB_NAME = testdb
6+ MY_DB_USER = myuser
7+ MY_DB_PASSWORD = mypassword
8+ MY_DB_ROOT_PASSWORD = myrootpassword
Original file line number Diff line number Diff line change 1+ logs /nginx /*
2+ logs /php /*
3+ mysql /data /*
4+ postgres /data /*
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ FROM mysql:8.0.23
2+ EXPOSE 3306
3+ CMD ["mysqld" ]
Original file line number Diff line number Diff line change 11FROM nginx:1.18
22WORKDIR /var/www
3- CMD [ "nginx" ]
4- EXPOSE 80
3+ EXPOSE 80
4+ CMD [ "nginx" ]
Original file line number Diff line number Diff line change @@ -3,26 +3,32 @@ server {
33 listen [::]:80 default_server ipv6only=on;
44
55 server_name localhost;
6- root /var/www/;
7- index index.php index.html index.htm;
6+
7+ root /var/www/public/;
8+
9+ index index.php;
810
911 location ~ /\.ht {
1012 deny all;
1113 }
1214
1315 location / {
16+ # try to serve directly or fallback to index.php
1417 try_files $uri $uri/ /index.php$is_args$args;
1518 }
1619
17- location ~ \.php$ {
18- try_files $uri /index.php =404;
20+ location ~ ^/index \.php(/|$) {
21+
1922 fastcgi_pass php-upstream;
20- fastcgi_index index.php;
21- fastcgi_buffers 16 16k;
22- fastcgi_buffer_size 32k;
23- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
23+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
2424 fastcgi_read_timeout 600;
2525 include fastcgi_params;
26+
27+ fastcgi_buffers 16 16k;
28+ fastcgi_buffer_size 32k;
29+
30+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
31+ fastcgi_param DOCUMENT_ROOT $realpath_root;
2632 }
2733
2834}
Original file line number Diff line number Diff line change 11FROM php:7.4.14-fpm
2+
3+ RUN apt-get update && apt-get install -y \
4+ git \
5+ libicu-dev \
6+ libpq-dev \
7+ && pecl install xdebug \
8+ && docker-php-ext-enable xdebug \
9+ && docker-php-ext-install -j$(nproc) intl \
10+ && docker-php-ext-install -j$(nproc) pgsql \
11+ && docker-php-ext-install -j$(nproc) pdo_pgsql \
12+ && docker-php-ext-install -j$(nproc) pdo_mysql
13+
214WORKDIR /var/www
3- COPY --from=composer /usr/bin/composer /usr/bin/composer
15+
416RUN curl -sS https://get.symfony.com/cli/installer | bash
5- RUN echo "export PATH=\" $HOME/.symfony/bin:$PATH\" " > ~/.bashrc
6- RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
7- CMD ["php-fpm" ]
8- EXPOSE 9000
17+ # make symfony command available globally
18+ RUN mv /root/.symfony/bin/symfony /usr/local/bin/symfony
19+
20+ EXPOSE 9000
21+ CMD ["php-fpm" ]
You can’t perform that action at this time.
0 commit comments