Current Mac Files
This commit is contained in:
66
compose-env-laravel/docker-compose.yml
Executable file
66
compose-env-laravel/docker-compose.yml
Executable file
@@ -0,0 +1,66 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
#image: mysql:latest
|
||||
image: mariadb:latest
|
||||
container_name: laravel-db
|
||||
environment:
|
||||
MYSQL_DATABASE: laravel
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/scriptsdb:/docker-entrypoint-initdb.d
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_laravel/databases/test-docker-app:/var/lib/mysql
|
||||
user: mysql
|
||||
ports:
|
||||
- 9081:3306
|
||||
networks:
|
||||
- laravel-stack
|
||||
php-test-docker-app:
|
||||
depends_on:
|
||||
- db
|
||||
build:
|
||||
context: ./docker-file-php
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-php
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/test-docker-app/:/var/www/html"
|
||||
#ports:
|
||||
# - 9080:80
|
||||
# - 9081:443
|
||||
networks:
|
||||
- laravel-stack
|
||||
nginx-test-docker-app:
|
||||
build:
|
||||
context: ./docker-file-nginx
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-nginx
|
||||
ports:
|
||||
- 9083:80
|
||||
depends_on:
|
||||
- php-test-docker-app
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/test-docker-app/:/var/www/html"
|
||||
networks:
|
||||
- laravel-stack
|
||||
phpmyadmin:
|
||||
depends_on:
|
||||
- db
|
||||
image: phpmyadmin:apache
|
||||
container_name: laravel-myadmin
|
||||
ports:
|
||||
- 9082:80
|
||||
environment:
|
||||
- PMA_HOST=db
|
||||
- PMA_PORT=3306
|
||||
- UPLOAD_LIMIT=500M
|
||||
- MEMORY_LIMIT=5000M
|
||||
- MAX_EXECUTION_TIME=0
|
||||
networks:
|
||||
- laravel-stack
|
||||
networks:
|
||||
laravel-stack:
|
||||
driver: bridge
|
||||
4
compose-env-laravel/docker-file-nginx/Dockerfile
Executable file
4
compose-env-laravel/docker-file-nginx/Dockerfile
Executable file
@@ -0,0 +1,4 @@
|
||||
FROM nginx
|
||||
RUN apt update
|
||||
RUN apt install -y vim
|
||||
COPY conf/default.conf /etc/nginx/conf.d
|
||||
31
compose-env-laravel/docker-file-nginx/conf/default.conf
Executable file
31
compose-env-laravel/docker-file-nginx/conf/default.conf
Executable file
@@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
index index.html index.php;
|
||||
|
||||
client_max_body_size 5M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/.+\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php-test-docker-app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param REALPATHTEST $realpath_root;
|
||||
internal;
|
||||
}
|
||||
}
|
||||
5
compose-env-laravel/docker-file-php/90-xdebug.ini
Executable file
5
compose-env-laravel/docker-file-php/90-xdebug.ini
Executable file
@@ -0,0 +1,5 @@
|
||||
zend_extension=xdebug.so
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.discover_client_host=0
|
||||
xdebug.client_host=host.docker.internal
|
||||
19
compose-env-laravel/docker-file-php/Dockerfile
Executable file
19
compose-env-laravel/docker-file-php/Dockerfile
Executable file
@@ -0,0 +1,19 @@
|
||||
FROM php:8.3.1-fpm-alpine
|
||||
|
||||
#Referencia solucion https://github.com/caohoangtu/docker-laravel/tree/master
|
||||
RUN apk add --update --no-cache autoconf g++ make openssl-dev
|
||||
RUN apk add libpng-dev
|
||||
RUN apk add libzip-dev
|
||||
RUN apk add --update linux-headers
|
||||
|
||||
RUN docker-php-ext-install gd
|
||||
RUN docker-php-ext-install zip
|
||||
RUN docker-php-ext-install bcmath
|
||||
RUN docker-php-ext-install sockets
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
|
||||
|
||||
#install xdebug
|
||||
RUN pecl install xdebug
|
||||
COPY 90-xdebug.ini "${PHP_INI_DIR}"/conf.d
|
||||
Reference in New Issue
Block a user