Last active
August 8, 2017 08:58
-
-
Save 5n00p4eg/fc49165e88a8deae3b4568ca46de7d64 to your computer and use it in GitHub Desktop.
My regular Drupal + Docker + Composer setup
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
<VirtualHost *:80> | |
DocumentRoot "/var/www/web" | |
ServerName localhost | |
ServerAdmin postmaster | |
<Directory /var/www/web> | |
allow from all | |
</Directory> | |
</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
#echo "UID=`id -u`" > .env |
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
; Put it in the config dir | |
log_errors = On | |
;error_log = /dev/stderr | |
display_error = On | |
display_startup_errors = On | |
error_reporting = E_ALL | E_STRICT | |
default_charset = "utf-8" | |
xdebug.remote_enable=1 | |
xdebug.idekey="cap" | |
;xdebug.remote_connect_back ;;Don't work in docker | |
xdebug.remote_port=9000 | |
;You need to assing this ip to your loopback device | |
;ifconfig lo0 alias 10.254.254.254 | |
xdebug.remote_host=10.254.254.254 | |
upload_max_filesize = 100M | |
post_max_size = 100M |
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
version: '3' | |
services: | |
web: | |
build: . | |
ports: | |
- "8080:80" | |
volumes: | |
- ./:/var/www | |
- ./drush.wrapper:/usr/local/bin/drush | |
- ./ssh:/root/.ssh | |
links: | |
- db:db | |
working_dir: /var/www | |
db: | |
image: "mariadb" | |
volumes: | |
- ./sql:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: "root" | |
expose: | |
- "3306" | |
user: "${UID}" | |
phpmyadmin: | |
image: "phpmyadmin/phpmyadmin" | |
environment: | |
MYSQL_ROOT_PASSWORD: "root" | |
links: | |
- "db:db" | |
ports: | |
- "8081:80" |
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
FROM php:7-apache | |
RUN apt-get update && apt-get install -y \ | |
vim \ | |
php5-mysql \ | |
git \ | |
unzip \ | |
mysql-client | |
#Php deps | |
RUN apt-get install -y \ | |
zlib1g-dev \ | |
libpng-dev \ | |
libjpeg62-turbo-dev \ | |
libfreetype6-dev \ | |
libjpeg62-turbo | |
RUN docker-php-ext-install \ | |
mysqli \ | |
pdo \ | |
pdo_mysql \ | |
zip \ | |
opcache | |
RUN docker-php-ext-configure \ | |
gd --with-freetype-dir=/usr/include/ \ | |
--with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install gd | |
RUN pecl install xdebug && \ | |
docker-php-ext-enable xdebug | |
COPY config/php-dev.ini /usr/local/etc/php/conf.d/ | |
COPY config/apache_vhost.conf /etc/apache2/sites-available/ | |
RUN a2dissite 000-default && \ | |
a2ensite apache_vhost | |
RUN usermod -u 1000 www-data && \ | |
a2enmod rewrite headers expires |
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
# Ignore directories generated by Composer | |
/drush/contrib/ | |
/vendor/ | |
/web/core/ | |
/web/modules/contrib/ | |
/web/themes/contrib/ | |
/web/profiles/contrib/ | |
/web/libraries/ | |
# Ignore sensitive information | |
/web/sites/*/settings.php | |
/web/sites/*/settings.local.php | |
# Ignore Drupal's file directory | |
/web/sites/*/files/ | |
# Ignore SimpleTest multi-site environment. | |
/web/sites/simpletest | |
# Ignore files generated by PhpStorm | |
/.idea/ | |
/.env | |
/sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment