mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-26 07:15:30 +02:00
Simplified and reorganized Docker development files
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
# Build apache image
|
||||
FROM php:7.4-apache
|
||||
LABEL maintainer="Chris Kankiewicz <Chris@ChrisKankiewicz.com>"
|
||||
|
||||
COPY ./php/config/php.ini /usr/local/etc/php/php.ini
|
||||
COPY ./apache/config/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
RUN a2enmod rewrite
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
@@ -1,7 +0,0 @@
|
||||
# Build php-fpm image
|
||||
FROM php:7.4-fpm
|
||||
LABEL maintainer="Chris Kankiewicz <Chris@ChrisKankiewicz.com>"
|
||||
|
||||
COPY ./php/config/php.ini /usr/local/etc/php/php.ini
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
@@ -1,30 +0,0 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
|
||||
access_log /dev/stderr;
|
||||
error_log /dev/stderr;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php {
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
|
||||
fastcgi_pass php-fpm:9000;
|
||||
fastcgi_index index.php;
|
||||
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM php:7.4-apache
|
||||
LABEL maintainer="Chris Kankiewicz <Chris@ChrisKankiewicz.com>"
|
||||
|
||||
COPY .docker/apache/config/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY .docker/php/config/php.ini /usr/local/etc/php/php.ini
|
||||
|
||||
RUN a2enmod rewrite
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
|
||||
WORKDIR /var/www/html
|
@@ -1,32 +1,11 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
apache:
|
||||
container_name: directory-lister-apache
|
||||
build:
|
||||
context: .docker
|
||||
dockerfile: Dockerfile.apache
|
||||
app:
|
||||
container_name: directory-lister-app
|
||||
build: .
|
||||
environment:
|
||||
VIRTUAL_HOST: directory-lister.local,directory-lister.apache.local
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
container_name: directory-lister-nginx
|
||||
image: nginx:1.17
|
||||
environment:
|
||||
VIRTUAL_HOST: directory-lister.nginx.local
|
||||
volumes:
|
||||
- ./.docker/nginx/config/default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./:/var/www/html
|
||||
restart: unless-stopped
|
||||
|
||||
php-fpm:
|
||||
container_name: directory-lister-php-fpm
|
||||
build:
|
||||
context: .docker
|
||||
dockerfile: Dockerfile.nginx
|
||||
VIRTUAL_HOST: directory-lister.local
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
restart: unless-stopped
|
||||
|
Reference in New Issue
Block a user