Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app directory to store app files outside DOCUMENT_ROOT #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/php54/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN pecl install xdebug-2.4.0RC4 && docker-php-ext-enable xdebug \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand Down
5 changes: 4 additions & 1 deletion bin/php56/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ RUN docker-php-ext-install curl \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand All @@ -41,4 +44,4 @@ RUN a2enmod rewrite headers
EXPOSE 80
EXPOSE 443

ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
3 changes: 3 additions & 0 deletions bin/php71/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN docker-php-ext-install -j$(nproc) gd
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand Down
5 changes: 4 additions & 1 deletion bin/php72/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ RUN docker-php-ext-install -j$(nproc) gd
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

# Enable apache modules
RUN a2enmod rewrite headers
RUN a2enmod rewrite headers
5 changes: 4 additions & 1 deletion bin/php73/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ RUN apt-get -y update && \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

# Enable apache modules
RUN a2enmod rewrite headers

# Cleanup
RUN rm -rf /usr/src/*
RUN rm -rf /usr/src/*
3 changes: 3 additions & 0 deletions bin/php74/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ libpng-dev && \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand Down
3 changes: 3 additions & 0 deletions bin/php8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ libpng-dev && \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand Down
3 changes: 3 additions & 0 deletions bin/php81/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ libpng-dev && \
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl

# create directory to store app files outside DOCUMENT ROOT
RUN mkdir /var/app

# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
links:
- database
volumes:
- ${APP_DIR-./app}:/var/app:rw
- ${DOCUMENT_ROOT-./www}:/var/www/html:rw
- ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
- ${SSL_DIR-./config/ssl}:/etc/apache2/ssl/
Expand Down
1 change: 1 addition & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ COMPOSE_PROJECT_NAME=lamp

# Possible values: php54, php56, php71, php72, php73, php74, php8, php81
PHPVERSION=php8
APP_DIR=./app
DOCUMENT_ROOT=./www
APACHE_DOCUMENT_ROOT=/var/www/html
VHOSTS_DIR=./config/vhosts
Expand Down