Permalink
Browse files

I'm not a historian

  • Loading branch information...
cmmarslender committed Nov 11, 2016
0 parents commit a1da05634d07a598efddfef83ce45d47dbb446e5
Showing with 175 additions and 0 deletions.
  1. +35 −0 .gitignore
  2. +1 −0 data/.gitkeep
  3. +44 −0 docker-compose.yml
  4. +33 −0 dockerfiles/nginx/default.conf
  5. +53 −0 dockerfiles/php-fpm/Dockerfile
  6. +8 −0 readme.md
  7. +1 −0 wordpress/.gitkeep
@@ -0,0 +1,35 @@
# Version Control
.svn
# OS
.DS_Store
Thumbs.db
# IDEs
.buildpath
.project
.settings/
.build/
.idea/
nbproject/
/tags
.netbeans.xml
# Compass/SASS/SCSS
.sass-cache
# Other
node_modules
/vendor/
/release/
sassdoc
scss-lint-report.xml
config.codekit
/wordpress/*
!/wordpress/.gitkeep
/data/*
!/data/.gitkeep
docker-compose.override.yml
@@ -0,0 +1 @@
# Basically just want to ignore the directory contents
@@ -0,0 +1,44 @@
version: '2'
services:
mysql:
image: mariadb:latest
volumes:
- "./data/db:/var/lib/mysql"
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
memcached:
image: memcached:latest
restart: always
elasticsearch:
image: elasticsearch:2
restart: always
phpfpm:
depends_on:
- mysql
- memcached
- elasticsearch
- mailhog
image: cmmarslender/phpfpm:latest
build: dockerfiles/php-fpm
volumes:
- "./wordpress:/var/www/html"
# - "./docker/php-fpm/php.ini:/usr/local/etc/php/php.ini"
restart: always
extra_hosts:
- "docker-local.dev:172.18.0.1"
nginx:
depends_on:
- phpfpm
ports:
- "80:80"
image: nginx:latest
volumes:
- "./wordpress:/var/www/html"
- "./dockerfiles/nginx/default.conf:/etc/nginx/conf.d/default.conf"
restart: always
@@ -0,0 +1,33 @@
server {
listen 80 default_server;
server_name _;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /var/www/html;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass phpfpm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
add_header Access-Control-Allow-Origin *;
}
# This should match upload_max_filesize in php.ini
client_max_body_size 100m;
}
@@ -0,0 +1,53 @@
FROM php:7-fpm
ARG INSTALL_XDEBUG=true
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
pecl install xdebug && \
docker-php-ext-enable xdebug \
;fi
RUN apt-get update \
&& apt-get install -y \
libjpeg-dev \
libpng-dev \
libz-dev \
less \
&& docker-php-ext-install -j$(nproc) \
gd \
mysqli \
zip \
pdo \
pdo_mysql \
&& docker-php-ext-enable gd mysqli zip pdo pdo_mysql \
&& apt-get remove -u build-essential libz-dev \
&& apt-get autoremove -y \
&& apt-get clean
RUN apt-get update && apt-get -y install libmemcached11 libmemcachedutil2 libmemcached-dev git \
&& mkdir -p /opt/memcached \
&& cd /opt/memcached \
&& git clone --branch php7 https://github.com/php-memcached-dev/php-memcached \
&& cd php-memcached \
&& phpize \
&& ./configure \
&& make \
&& mv /opt/memcached/php-memcached/modules/memcached.so /opt/memcached/memcached.so \
&& cd /opt/memcached \
&& rm -r php-memcached \
&& echo "extension=/opt/memcached/memcached.so" > /usr/local/etc/php/conf.d/memcached.ini \
&& apt-get remove -y build-essential libmemcached-dev libz-dev git \
&& apt-get autoremove -y \
&& apt-get clean
RUN curl https://getcomposer.org/download/1.2.0/composer.phar > /tmp/composer.phar \
&& chmod +x /tmp/composer.phar \
&& mv /tmp/composer.phar /usr/local/bin/composer \
&& apt-get update && apt-get install -y less \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > /tmp/wp-cli.phar \
&& chmod +x /tmp/wp-cli.phar \
&& mv /tmp/wp-cli.phar /usr/local/bin/wp
CMD ["php-fpm"]
EXPOSE 9000
@@ -0,0 +1,8 @@
# Template for Docker Development Environments
## Setup
1. `git clone git@github.com:cmmarslender/docker-template.git <my-project-name>`
1. `cd <my-project-name>`
1. `docker-compose up`
The `wordpress` folder is configured as the webroot by default. Download WordPress and anything else you need here.
@@ -0,0 +1 @@
# Basically just want to ignore the directory contents

0 comments on commit a1da056

Please sign in to comment.