-
Notifications
You must be signed in to change notification settings - Fork 2
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
289cfe1
commit 4dce626
Showing
2 changed files
with
44 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,36 @@ | ||
FROM php:7.2-apache | ||
|
||
# Add apache and php config for Laravel | ||
COPY ./tsugi.conf /etc/apache2/sites-available/site.conf | ||
RUN ln -s /etc/apache2/sites-available/site.conf /etc/apache2/sites-enabled/ | ||
#RUN sed -i 's/Listen 80/Listen 6300/g' /etc/apache2/ports.conf | ||
RUN a2dissite 000-default.conf && a2ensite site.conf && a2enmod rewrite && a2enmod headers | ||
|
||
# Install composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
# Copy composer.lock and composer.json | ||
#COPY composer.lock composer.json /var/www/ | ||
# Set working directory | ||
WORKDIR /var/www | ||
# Install dependencies | ||
RUN apt-get update && apt-get install -y git netcat vim && apt-get clean -y | ||
RUN docker-php-ext-install pdo pdo_mysql mysqli | ||
|
||
# Change uid and gid of apache to docker user uid/gid | ||
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data | ||
#RUN sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf | ||
|
||
WORKDIR /var/www/html/tsugi | ||
|
||
|
||
|
||
# Copy the PHP configuration file | ||
COPY ./php.ini /usr/local/etc/php/ | ||
COPY . /var/www/html/tsugi | ||
#COPY . /var/www/html/ | ||
|
||
COPY ./entrypoint.tsugi.sh ./ | ||
RUN chmod +x /var/www/html/tsugi/entrypoint.tsugi.sh | ||
|
||
ENTRYPOINT ["sh", "/var/www/html/tsugi/entrypoint.tsugi.sh"] |
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,8 @@ | ||
#!/bin/bash | ||
|
||
cd /var/www/html/tsugi | ||
touch health.ok | ||
cd /var/www/html/tsugi/mod/curriki | ||
composer install | ||
|
||
apache2ctl -D FOREGROUND |