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 1
1
FROM nginx:1.18
2
2
WORKDIR /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 {
3
3
listen [::]:80 default_server ipv6only=on;
4
4
5
5
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;
8
10
9
11
location ~ /\.ht {
10
12
deny all;
11
13
}
12
14
13
15
location / {
16
+ # try to serve directly or fallback to index.php
14
17
try_files $uri $uri/ /index.php$is_args$args;
15
18
}
16
19
17
- location ~ \.php$ {
18
- try_files $uri /index.php =404;
20
+ location ~ ^/index \.php(/|$) {
21
+
19
22
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)(/.*)$;
24
24
fastcgi_read_timeout 600;
25
25
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;
26
32
}
27
33
28
34
}
Original file line number Diff line number Diff line change 1
1
FROM 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
+
2
14
WORKDIR /var/www
3
- COPY --from=composer /usr/bin/composer /usr/bin/composer
15
+
4
16
RUN 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