Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa08c51
commit 0ee345e
Showing
5 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM httpd:2.4.33-alpine | ||
|
||
RUN apk update; \ | ||
apk upgrade; | ||
|
||
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf | ||
|
||
# Copy apache vhost file to proxy php requests to php-fpm container | ||
COPY apache.conf /usr/local/apache2/conf/apache.conf | ||
RUN echo "Include /usr/local/apache2/conf/apache.conf" \ | ||
>> /usr/local/apache2/conf/httpd.conf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ServerName localhost | ||
|
||
LogLevel trace8 | ||
|
||
LoadModule deflate_module /usr/local/apache2/modules/mod_deflate.so | ||
LoadModule proxy_module /usr/local/apache2/modules/mod_proxy.so | ||
LoadModule proxy_fcgi_module /usr/local/apache2/modules/mod_proxy_fcgi.so | ||
LoadModule rewrite_module /usr/local/apache2/modules/mod_rewrite.so | ||
|
||
<VirtualHost *:80> | ||
# Proxy .php requests to port 9000 of the php-fpm container | ||
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://php:9000/var/www/html/$1 | ||
DocumentRoot /var/www/html/ | ||
<Directory /var/www/html/> | ||
Options Indexes FollowSymLinks | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
|
||
# Send apache logs to stdout and stderr | ||
LogFormat "%h %l %u %t \"%r\" %>s %b" common | ||
CustomLog /var/log/apache2/acess.log common | ||
ErrorLog /var/log/apache2/error.log | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
version: "3.2" | ||
services: | ||
php: | ||
build: './php/' | ||
networks: | ||
- backend | ||
volumes: | ||
- ..:/var/www/html/ | ||
- ./logs/mysql/:/var/log/mysql/ | ||
apache: | ||
build: './apache/' | ||
depends_on: | ||
- php | ||
- mysql | ||
networks: | ||
- frontend | ||
- backend | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ../:/var/www/html/ | ||
- ./logs/apache/:/var/log/apache2/ | ||
mysql: | ||
image: mysql:5.6.40 | ||
networks: | ||
- backend | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=rootpassword | ||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin:5.0.1 | ||
restart: always | ||
depends_on: | ||
- php | ||
- mysql | ||
networks: | ||
- frontend | ||
- backend | ||
environment: | ||
PMA_HOST: mysql | ||
PMA_USER: root | ||
PMA_PASSWORD: rootpassword | ||
ports: | ||
- "8081:80" | ||
networks: | ||
frontend: | ||
backend: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM php:7.2.7-fpm-alpine3.7 | ||
RUN apk update; \ | ||
apk upgrade; | ||
RUN docker-php-ext-install mysqli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[www] | ||
|
||
user = www-data | ||
group = www-data | ||
|
||
listen = apache2:9000 | ||
|
||
pm = dynamic | ||
pm.max_children = 5 | ||
pm.start_servers = 2 | ||
pm.min_spare_servers = 1 | ||
pm.max_spare_servers = 3 |