Docker for backend

This commit is contained in:
2021-03-15 17:41:25 -03:00
parent da46128755
commit ddea78a30a
4 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,6 @@
FROM php:7.4-fpm
RUN docker-php-ext-install pdo pdo_mysql
RUN pecl install xdebug-3.0.3 \
&& docker-php-ext-enable xdebug

22
app/docker/nginx.conf Normal file
View File

@ -0,0 +1,22 @@
server {
listen 80;
server_name money_app;
index index.php;
error_log /code/app/logs/error.log;
access_log /code/app/logs/access.log;
root /code/app/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass app-php:9000;
}
}