From 4030cc2f2660b3e9e953abf75d9317aa85118189 Mon Sep 17 00:00:00 2001 From: philtrep Date: Sun, 9 Oct 2016 21:01:49 -0400 Subject: [PATCH 01/45] Added certbot container --- certbot/Dockerfile | 8 ++++++++ certbot/letsencrypt/.gitkeep | 0 certbot/letsencrypt/.well-known/.gitkeep | 0 certbot/run-certbot.sh | 6 ++++++ docker-compose.yml | 13 +++++++++++++ nginx/nginx.conf | 4 ++++ 6 files changed, 31 insertions(+) create mode 100644 certbot/Dockerfile create mode 100644 certbot/letsencrypt/.gitkeep create mode 100644 certbot/letsencrypt/.well-known/.gitkeep create mode 100644 certbot/run-certbot.sh diff --git a/certbot/Dockerfile b/certbot/Dockerfile new file mode 100644 index 00000000..c62405e9 --- /dev/null +++ b/certbot/Dockerfile @@ -0,0 +1,8 @@ +FROM phusion/baseimage:latest + +COPY run-certbot.sh /root/certbot/run-certbot.sh + +RUN apt-get update +RUN apt-get install -y letsencrypt + +ENTRYPOINT bash -c "bash /root/certbot/run-certbot.sh && sleep infinity" diff --git a/certbot/letsencrypt/.gitkeep b/certbot/letsencrypt/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/certbot/letsencrypt/.well-known/.gitkeep b/certbot/letsencrypt/.well-known/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/certbot/run-certbot.sh b/certbot/run-certbot.sh new file mode 100644 index 00000000..26be75c7 --- /dev/null +++ b/certbot/run-certbot.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text + +cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/cert1.pem +cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/privkey1.pem diff --git a/docker-compose.yml b/docker-compose.yml index b7eed65b..223d449d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -311,9 +311,22 @@ services: - "9300:9300" links: - php-fpm + +### Certbot Container ################################## + + certbot: + build: + context: ./certbot + volumes: + - ./data/certbot/certs/:/var/certs + - ./certbot/letsencrypt/:/var/www/letsencrypt + environment: + CN: "fake.domain.com" + EMAIL: "fake.email@gmail.com" ### Volumes Setup ########################################### + volumes: mysql: driver: "local" diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 97e5a0ed..40cb9d7c 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -23,6 +23,10 @@ http { error_log /var/log/nginx/error.log; gzip on; gzip_disable "msie6"; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; + include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-available/*; open_file_cache max=100; From 48f8f3c02da989fd1f13f6f39a2c21a5776faaed Mon Sep 17 00:00:00 2001 From: philtrep Date: Sat, 15 Oct 2016 10:40:22 -0400 Subject: [PATCH 02/45] Added certbot serving in laravel conf --- nginx/sites/default.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nginx/sites/default.conf b/nginx/sites/default.conf index d5058bd5..78f85cb2 100644 --- a/nginx/sites/default.conf +++ b/nginx/sites/default.conf @@ -22,6 +22,11 @@ server { location ~ /\.ht { deny all; } + + location /.well-known/acme-challenge/ { + root /var/www/letsencrypt/; + log_not_found off; + } } From d89a944e224c4246c6ee7da86e90464e7c158ddd Mon Sep 17 00:00:00 2001 From: philtrep Date: Sat, 15 Oct 2016 10:47:00 -0400 Subject: [PATCH 03/45] Added nginx config for certbot --- docker-compose.yml | 1 - nginx/sites/laravel-https.conf | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 nginx/sites/laravel-https.conf diff --git a/docker-compose.yml b/docker-compose.yml index 223d449d..54a3f135 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -326,7 +326,6 @@ services: ### Volumes Setup ########################################### - volumes: mysql: driver: "local" diff --git a/nginx/sites/laravel-https.conf b/nginx/sites/laravel-https.conf new file mode 100644 index 00000000..0704dbf8 --- /dev/null +++ b/nginx/sites/laravel-https.conf @@ -0,0 +1,30 @@ +server { + + listen 443 default_server; + listen [::]:443 default_server ipv6only=on; + + ssl on; + ssl_certificate /var/certs/cert1.pem; + ssl_certificate_key /var/certs/privkey1.pem; + + server_name laravel; + root /var/www/laravel/public; + index index.php index.html index.htm; + + location / { + try_files $uri $uri/ /index.php$is_args$args; + } + + location ~ \.php$ { + try_files $uri /index.php =404; + fastcgi_pass php-upstream; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.ht { + deny all; + } + +} From b401c517b2fcd1724069ed125ac147d1693acc64 Mon Sep 17 00:00:00 2001 From: Vladimir Kireyko Date: Thu, 15 Dec 2016 15:05:48 +0200 Subject: [PATCH 04/45] Add dockerfile with php-fpm 7.1 --- php-fpm/Dockerfile-71 | 160 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 php-fpm/Dockerfile-71 diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 new file mode 100644 index 00000000..065a32fb --- /dev/null +++ b/php-fpm/Dockerfile-71 @@ -0,0 +1,160 @@ +# +#-------------------------------------------------------------------------- +# Image Setup +#-------------------------------------------------------------------------- +# +# To edit the 'php-fpm' base Image, visit its repository on Github +# https://github.com/LaraDock/php-fpm +# +# To change its version, see the available Tags on the Docker Hub: +# https://hub.docker.com/r/laradock/php-fpm/tags/ +# + +FROM laradock/php-fpm:7.1--0.0 # placeholder. Need change after new image would be built. + +MAINTAINER Mahmoud Zalt + +# +#-------------------------------------------------------------------------- +# Mandatory Software's Installation +#-------------------------------------------------------------------------- +# +# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....) +# are installed on the base image 'laradock/php-fpm' image. If you want +# to add more Software's or remove existing one, you need to edit the +# base image (https://github.com/LaraDock/php-fpm). +# + +# +#-------------------------------------------------------------------------- +# Optional Software's Installation +#-------------------------------------------------------------------------- +# +# Optional Software's will only be installed if you set them to `true` +# in the `docker-compose.yml` before the build. +# Example: +# - INSTALL_ZIP_ARCHIVE=true +# - ... +# + +##################################### +# xDebug: +##################################### + +ARG INSTALL_XDEBUG=false +RUN if [ ${INSTALL_XDEBUG} = true ]; then \ + # Install the xdebug extension + pecl install xdebug && \ + docker-php-ext-enable xdebug \ +;fi + +# Copy xdebug configration for remote debugging +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + +##################################### +# MongoDB: +##################################### + +ARG INSTALL_MONGO=false +RUN if [ ${INSTALL_MONGO} = true ]; then \ + # Install the mongodb extension + pecl install mongodb && \ + docker-php-ext-enable mongodb \ +;fi + +##################################### +# ZipArchive: +##################################### + +ARG INSTALL_ZIP_ARCHIVE=false +RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ + # Install the zip extension + pecl install zip && \ + docker-php-ext-enable zip \ +;fi + +##################################### +# PHP Memcached: +##################################### + +ARG INSTALL_MEMCACHED=false +RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ + # Install the php memcached extension + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ + && mkdir -p memcached \ + && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ + && ( \ + cd memcached \ + && phpize \ + && ./configure \ + && make -j$(nproc) \ + && make install \ + ) \ + && rm -r memcached \ + && rm /tmp/memcached.tar.gz \ + && docker-php-ext-enable memcached \ +;fi + +##################################### +# PHP Aerospike: +##################################### + +ARG INSTALL_AEROSPIKE_EXTENSION=false +ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} +# Copy aerospike configration for remote debugging +COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini +RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ + # Install the php aerospike extension + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ + && mkdir -p aerospike-client-php \ + && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ + && ( \ + cd aerospike-client-php/src/aerospike \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + && rm /tmp/aerospike-client-php.tar.gz \ +;fi + +##################################### +# Opcache: +##################################### +ARG INSTALL_OPCACHE=false +RUN if [ ${INSTALL_OPCACHE} = true ]; then \ + docker-php-ext-install opcache && \ + docker-php-ext-enable opcache \ +;fi + +# Copy opcache configration +COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini + +##################################### +# Codeigniter Modifications: +##################################### + +ARG CODEIGNITER=false +RUN if [ ${CODEIGNITER} = true ]; then \ + # Install Codeigniter PHP extentions requirements + docker-php-ext-install mysqli && \ + docker-php-ext-install tokenizer \ +;fi + +# +#-------------------------------------------------------------------------- +# Final Touch +#-------------------------------------------------------------------------- +# + +ADD ./laravel.ini /usr/local/etc/php/conf.d +ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ + +RUN rm -r /var/lib/apt/lists/* + +RUN usermod -u 1000 www-data + +WORKDIR /var/www + +CMD ["php-fpm"] + +EXPOSE 9000 From aabe504c24c5913896bd8f1930402003ca9f3383 Mon Sep 17 00:00:00 2001 From: Vladimir Kireyko Date: Thu, 15 Dec 2016 15:13:00 +0200 Subject: [PATCH 05/45] Add dokerfile with php 7.1 --- docker-compose.yml | 1 + workspace/Dockerfile-71 | 260 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+) create mode 100644 workspace/Dockerfile-71 diff --git a/docker-compose.yml b/docker-compose.yml index 2c4a6334..69352bd5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,6 +29,7 @@ services: - PGID=1000 - NODE_VERSION=stable - TZ=UTC + # dockerfile: Dockerfile-71 volumes_from: - applications extra_hosts: diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 new file mode 100644 index 00000000..1f9fb855 --- /dev/null +++ b/workspace/Dockerfile-71 @@ -0,0 +1,260 @@ +# +#-------------------------------------------------------------------------- +# Image Setup +#-------------------------------------------------------------------------- +# +# To edit the 'workspace' base Image, visit its repository on Github +# https://github.com/LaraDock/workspace +# +# To change its version, see the available Tags on the Docker Hub: +# https://hub.docker.com/r/laradock/workspace/tags/ +# + +FROM laradock/workspace:1.3 # placeholder. Need change after new image would be built. + +MAINTAINER MAINTAINER Mahmoud Zalt + +# +#-------------------------------------------------------------------------- +# Mandatory Software's Installation +#-------------------------------------------------------------------------- +# +# Mandatory Software's such as ("php7.1-cli", "git", "vim", ....) are +# installed on the base image 'laradock/workspace' image. If you want +# to add more Software's or remove existing one, you need to edit the +# base image (https://github.com/LaraDock/workspace). +# + +# +#-------------------------------------------------------------------------- +# Optional Software's Installation +#-------------------------------------------------------------------------- +# +# Optional Software's will only be installed if you set them to `true` +# in the `docker-compose.yml` before the build. +# Example: +# - INSTALL_NODE=false +# - ... +# + +##################################### +# Non-Root User: +##################################### + +# Add a non-root user to prevent files being created with root permissions on host machine. +ARG PUID=1000 +ARG PGID=1000 +RUN groupadd -g $PGID laradock && \ + useradd -u $PUID -g laradock -m laradock + +##################################### +# Set Timezone +##################################### + +ARG TZ=UTC +ENV TZ ${TZ} +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +##################################### +# Composer: +##################################### + +# Add the composer.json +COPY ./composer.json /home/laradock/.composer/composer.json + +# Make sure that ~/.composer belongs to laradock +RUN chown -R laradock:laradock /home/laradock/.composer +USER laradock + +# Check if global install need to be ran +ARG COMPOSER_GLOBAL_INSTALL=false +ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL} +RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \ + # run the install + composer global install \ +;fi + +##################################### +# Crontab +##################################### +USER root + +COPY ./crontab /var/spool/cron/crontabs + +##################################### +# xDebug: +##################################### + +ARG INSTALL_XDEBUG=false +RUN if [ ${INSTALL_XDEBUG} = true ]; then \ + # Load the xdebug extension only with phpunit commands + apt-get update && \ + apt-get install -y --force-yes php-xdebug && \ + sed -i 's/^/;/g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \ + echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ +;fi +# ADD for REMOTE debugging +COPY ./xdebug.ini /etc/php/7.1/cli/conf.d/xdebug.ini + +##################################### +# ssh: +##################################### +ARG INSTALL_WORKSPACE_SSH=false +ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} + +ADD insecure_id_rsa /tmp/id_rsa +ADD insecure_id_rsa.pub /tmp/id_rsa.pub + +RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ + rm -f /etc/service/sshd/down && \ + cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \ + && cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \ + && cat /tmp/id_rsa >> /root/.ssh/id_rsa \ + && rm -f /tmp/id_rsa* \ + && chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \ + && chmod 400 /root/.ssh/id_rsa \ +;fi + +##################################### +# MongoDB: +##################################### + +# Check if Mongo needs to be installed +ARG INSTALL_MONGO=false +ENV INSTALL_MONGO ${INSTALL_MONGO} +RUN if [ ${INSTALL_MONGO} = true ]; then \ + # Install the mongodb extension + pecl install mongodb && \ + echo "extension=mongodb.so" >> /etc/php/7.1/cli/conf.d/30-mongodb.ini \ +;fi + +##################################### +# Drush: +##################################### +USER root +ENV DRUSH_VERSION 8.1.2 +ARG INSTALL_DRUSH=false +ENV INSTALL_DRUSH ${INSTALL_DRUSH} +RUN if [ ${INSTALL_DRUSH} = true ]; then \ + # Install Drush 8 with the phar file. + curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \ + chmod +x /usr/local/bin/drush && \ + drush core-status \ +;fi + +USER laradock + +##################################### +# Node / NVM: +##################################### + +# Check if NVM needs to be installed +ARG NODE_VERSION=stable +ENV NODE_VERSION ${NODE_VERSION} +ARG INSTALL_NODE=false +ENV INSTALL_NODE ${INSTALL_NODE} +ENV NVM_DIR /home/laradock/.nvm +RUN if [ ${INSTALL_NODE} = true ]; then \ + # Install nvm (A Node Version Manager) + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.6/install.sh | bash && \ + . $NVM_DIR/nvm.sh && \ + nvm install ${NODE_VERSION} && \ + nvm use ${NODE_VERSION} && \ + nvm alias ${NODE_VERSION} && \ + npm install -g gulp bower vue-cli \ +;fi + +# Wouldn't execute when added to the RUN statement in the above block +# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell +RUN if [ ${INSTALL_NODE} = true ]; then \ + echo "" >> ~/.bashrc && \ + echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \ + echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \ +;fi + +# Add NVM binaries to root's .bashrc +USER root + +RUN if [ ${INSTALL_NODE} = true ]; then \ + echo "" >> ~/.bashrc && \ + echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \ + echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \ +;fi + +##################################### +# YARN: +##################################### + +USER laradock + +ARG INSTALL_YARN=false +ENV INSTALL_YARN ${INSTALL_YARN} + +RUN if [ ${INSTALL_YARN} = true ]; then \ + [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \ + curl -o- -L https://yarnpkg.com/install.sh | bash && \ + echo "" >> ~/.bashrc && \ + echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \ +;fi + +# Add YARN binaries to root's .bashrc +USER root + +RUN if [ ${INSTALL_YARN} = true ]; then \ + echo "" >> ~/.bashrc && \ + echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \ + echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \ +;fi + +##################################### +# PHP Aerospike: +##################################### +USER root + +ARG INSTALL_AEROSPIKE_EXTENSION=true +ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} + +# Copy aerospike configration for remote debugging +COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini + +RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ + # Install the php aerospike extension + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ + && mkdir -p aerospike-client-php \ + && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ + && ( \ + cd aerospike-client-php/src/aerospike \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + && rm /tmp/aerospike-client-php.tar.gz \ +;fi + +RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ + rm /etc/php/7.1/cli/conf.d/aerospike.ini \ +;fi + +##################################### +# Non-root user : PHPUnit path +##################################### + +# add ./vendor/bin to non-root user's bashrc (needed for phpunit) +USER laradock + +RUN echo "" >> ~/.bashrc && \ + echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc + +# +#-------------------------------------------------------------------------- +# Final Touch +#-------------------------------------------------------------------------- +# + +# Clean up +USER root +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# Set default work directory +WORKDIR /var/www From 7b542618f0e27f5ec5892b91df01faf46be951df Mon Sep 17 00:00:00 2001 From: alchimik Date: Sun, 19 Feb 2017 13:26:18 +0800 Subject: [PATCH 06/45] Update opcache.ini --- php-fpm/opcache.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php-fpm/opcache.ini b/php-fpm/opcache.ini index 59683ba8..9a3f646b 100644 --- a/php-fpm/opcache.ini +++ b/php-fpm/opcache.ini @@ -1,4 +1,5 @@ -extension=opcache.so +; NOTE: The actual opcache.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini) + opcache.enable="1" opcache.memory_consumption="256" opcache.use_cwd="0" From 4947dfaad1b158529396926e1ae6a606116596c4 Mon Sep 17 00:00:00 2001 From: Riccardo Tribbia Date: Sat, 25 Feb 2017 21:25:33 +0100 Subject: [PATCH 07/45] - Add apache conf file for specific virtualhost ServerName --- apache2/Dockerfile | 3 +++ apache2/apache-config.conf | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 apache2/apache-config.conf diff --git a/apache2/Dockerfile b/apache2/Dockerfile index 569ba9f3..21373f5c 100644 --- a/apache2/Dockerfile +++ b/apache2/Dockerfile @@ -15,3 +15,6 @@ WORKDIR /var/www/public ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"] CMD ["supervisord"] + +# Update the default apache site with the config we created. +ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf \ No newline at end of file diff --git a/apache2/apache-config.conf b/apache2/apache-config.conf new file mode 100644 index 00000000..801be4ed --- /dev/null +++ b/apache2/apache-config.conf @@ -0,0 +1,16 @@ + + ServerAdmin me@mydomain.com + DocumentRoot /var/www/site + ServerName local.mydomain.com + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order deny,allow + Allow from all + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + \ No newline at end of file From ca45806aaa9b394f62629aaa4b05f167b584c91b Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 12:34:20 +0100 Subject: [PATCH 08/45] Updated gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7c6f11b7..b3403af6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea /logs /data +.env \ No newline at end of file From 474504f1d308250e8d2a5bba4e3a92eb50601d5a Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 12:35:28 +0100 Subject: [PATCH 09/45] Added env-example and adjusted docker-compose yml to support new env file --- .env | 5 ++ docker-compose.yml | 3 +- env-example | 164 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 env-example diff --git a/.env b/.env index accd09a0..7eac1a8b 100644 --- a/.env +++ b/.env @@ -1 +1,6 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1 + +# APPLICATIONS +APPLICATIONS_HOST_DIR=../ +APPLICATIONS_IMAGE_NAME=tianon/true +APPLICATIONS_CONTAINER_NAME=applications \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 67af2244..094ed9ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,7 @@ services: applications: image: tianon/true volumes: - - ../:/var/www -# - ../sample/:/var/www/sample + - ${APPLICATIONS_HOST_DIR}:/var/www ### Workspace Utilities Container ########################### diff --git a/env-example b/env-example new file mode 100644 index 00000000..5fa13c93 --- /dev/null +++ b/env-example @@ -0,0 +1,164 @@ +################## +# DOCKER COMPOSE # +# ################ + +DOCKER_HOST_IP=10.0.75.1 + +# Switch between PHP and HHVM interpreter +# PHP_INTERPRETER=hhvm +PHP_INTERPRETER=php-fpm + +# Switch between supported PHP versions... does not apply for HHVM. +# Please see composer.json in Laravel Framework for the minimum Php Version +#PHP_VERSION=55 +#PHP_VERSION=56 +PHP_VERSION=70 + +# APPLICATIONS +APPLICATIONS_HOST_DIR=../ +APPLICATIONS_IMAGE_NAME=tianon/true +APPLICATIONS_CONTAINER_NAME=applications + +# WORKSPACE +WORKSPACE_BUILD_PATH=./workspace +WORKSPACE_CONTAINER_NAME=workspace +WORKSPACE_INSTALL_XDEBUG=false +WORKSPACE_INSTALL_MONGO=false +WORKSPACE_INSTALL_NODE=false +WORKSPACE_INSTALL_YARN=false +WORKSPACE_INSTALL_DRUSH=false +WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false +WORKSPACE_COMPOSER_GLOBAL_INSTALL=false +WORKSPACE_INSTALL_WORKSPACE_SSH=false +WORKSPACE_PUID=1000 +WORKSPACE_PGID=1000 +WORKSPACE_NODE_VERSION=stable +WORKSPACE_TIMEZONE=UTC +WORKSPACE_SSH_PORT=2222 + + +# PHP_FPM +PHP_FPM_BUILD_PATH=./php-fpm +PHP_FPM_CONTAINER_NAME=php-fpm +PHP_FPM_DOCKER_FILE=Dockerfile-70 +PHP_FPM_INSTALL_XDEBUG=false +PHP_FPM_INSTALL_MONGO=false +PHP_FPM_INSTALL_ZIP_ARCHIVE=false +PHP_FPM_INSTALL_MEMCACHED=false +PHP_FPM_INSTALL_OPCACHE=false +PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false +PHP_FPM_CODEIGNITER=false +PHP_FPM_IDE_CONFIG=serverName=laravel + + +# NGINX +NGINX_BUILD_PATH=./nginx +NGINX_CONTAINER_NAME=nginx +NGINX_HOST_HTTP_PORT=8080 +NGINX_HOST_HTTPS_PORT=8433 +NGINX_HOST_LOG_PATH=./logs/nginx/ + + +# APACHE +APACHE2_BUILD_PATH=./apache2 +APACHE2_CONTAINER_NAME=apache2 +APACHE_HOST_HTTP_PORT=7080 +APACHE_HOST_HTTPS_PORT=7443 +APACHE2_PHP_SOCKET=php-fpm:9000 +APACHE_HOST_LOG_PATH=./logs/apache2 + +# HHVM +HHVM_BUILD_PATH=./hhvm +HHVM_CONTAINER_NAME=hhvm +HHVM_HOST_PORT=9000 + +# MYSQL +MYSQL_BUILD_PATH=./mysql +MYSQL_CONTAINER_NAME=mysql +MYSQL_HOST_PORT=3307 +MYSQL_ROOT_PASSWORD=root + +# MEMCACHED +MEMCACHED_BUILD_PATH=./memcached +MEMCACHED_CONTAINER_NAME=memcached +MEMCACHED_HOST_PORT=11211 + +# BEANSTALKD +BEANSTALKD_BUILD_PATH=./beanstalkd +BEANSTALKD_CONTAINER_NAME=beanstalkd +BEANSTALKD_HOST_PORT=11300 + +# BEANSTALKD CONSOLE +BEANSTALKD_CONSOLE_BUILD_PATH=./beanstalkd-console +BEANSTALKD_CONSOLE_CONTAINER_NAME=beanstalkd-console +BEANSTALKD_CONSOLE_HOST_PORT=2080 + +# RABBITMQ +RABBITMQ_BUILD_PATH=./rabbitmq +RABBITMQ_CONTAINER_NAME=rabbitmq +RABBITMQ_NODE_HOST_PORT=5672 +RABBITMQ_MANAGEMENT_HTTPS_HOST_PORT=15671 +RABBITMQ_MANAGEMENT_HTTP_HOST_PORT=15672 +RABBITMQ_DEFAULT_USER=guest +RABBITMQ_DEFAULT_PASS=guest + +# ELASTICSEARCH +ELASTICSEARCH_BUILD_PATH=./elasticsearch/versions/2 +ELASTICSEARCH_CONTAINER_NAME=elasticsearch +ELASTICSEARCH_HOST_HTTP_PORT=9200 +ELASTICSEARCH_HOST_TRANSPORT_PORT=9300 + +#################### +# LARAVEL SPECIFIC # +# ################## + +# APP +APP_ENV=local +APP_KEY=base64:FeZgPe6Pqm7dOCy7Sx0P/PQ9ICMuwAsHLms7DUOxCkI= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +# DATABASE +DB_CONNECTION=mysql + +# Laravel Original: DB_HOST=127.0.0.1 +# must match the service name or container name. +# so if we want to use mariadb it must look like: +# DB_HOST=mariadb +DB_HOST=mysql + +# IMPORTANT: +# - ports are defined in docker-compose.yml like HOST_PORT:CONTAINER_PORT +# - DB_PORT=3306 represents the CONTAINER_PORT not the HOST_PORT +# +# This means that this should not be changed unless you have also tweaked the database image created by +# docker-compose.yml. +DB_PORT=3306 +DB_DATABASE=default +DB_USERNAME=default +DB_PASSWORD=secret + +# DRIVERS +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +# REDIS +REDIS_HOST=redis +REDIS_PASSWORD=null +REDIS_PORT=6379 + +# MAIL +MAIL_DRIVER=smtp +MAIL_HOST=mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null + +# PUSHER +PUSHER_APP_ID= +PUSHER_KEY= +PUSHER_SECRET= From 3f13aa4f50e3346fea90cdafb9b1cdfdb6ce01de Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 12:36:44 +0100 Subject: [PATCH 10/45] Removed .env file --- .env | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 7eac1a8b..00000000 --- a/.env +++ /dev/null @@ -1,6 +0,0 @@ -COMPOSE_CONVERT_WINDOWS_PATHS=1 - -# APPLICATIONS -APPLICATIONS_HOST_DIR=../ -APPLICATIONS_IMAGE_NAME=tianon/true -APPLICATIONS_CONTAINER_NAME=applications \ No newline at end of file From fa9ac1e471c9521c272cf43b858e2f13ab41a9eb Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 13:53:40 +0100 Subject: [PATCH 11/45] Added workspace from env file and updated env-example --- docker-compose.yml | 38 +++++++++++++++++++------------------- env-example | 7 +++++-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 094ed9ab..08f0a95a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,25 +14,25 @@ services: workspace: build: context: ./workspace - args: - - INSTALL_XDEBUG=false - - INSTALL_SOAP=false - - INSTALL_MONGO=false - - INSTALL_NODE=false - - INSTALL_YARN=false - - INSTALL_DRUSH=false - - INSTALL_AEROSPIKE_EXTENSION=false - - INSTALL_V8JS_EXTENSION=false - - COMPOSER_GLOBAL_INSTALL=false - - INSTALL_WORKSPACE_SSH=false - - INSTALL_LARAVEL_ENVOY=false - - INSTALL_DEPLOYER=false - - INSTALL_LINUXBREW=false - - PUID=1000 - - PGID=1000 - - NODE_VERSION=stable - - YARN_VERSION=latest - - TZ=UTC + args: + - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} + - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} + - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} + - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} + - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} + - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH} + - INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION} + - INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION} + - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL} + - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH} + - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY} + - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_LARAVEL_ENVOY} + - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LARAVEL_ENVOY} + - PUID=${WORKSPACE_PUID} + - PGID=${WORKSPACE_PGID} + - NODE_VERSION=${WORKSPACE_NODE_VERSION} + - YARN_VERSION=${WORKSPACE_TIMEZONE} + - TZ=${WORKSPACE_TIMEZONE=UTC} volumes_from: - applications extra_hosts: diff --git a/env-example b/env-example index 5fa13c93..84c29181 100644 --- a/env-example +++ b/env-example @@ -20,16 +20,19 @@ APPLICATIONS_IMAGE_NAME=tianon/true APPLICATIONS_CONTAINER_NAME=applications # WORKSPACE -WORKSPACE_BUILD_PATH=./workspace -WORKSPACE_CONTAINER_NAME=workspace WORKSPACE_INSTALL_XDEBUG=false +WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_MONGO=false WORKSPACE_INSTALL_NODE=false WORKSPACE_INSTALL_YARN=false WORKSPACE_INSTALL_DRUSH=false WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false +WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION=false WORKSPACE_COMPOSER_GLOBAL_INSTALL=false WORKSPACE_INSTALL_WORKSPACE_SSH=false +WORKSPACE_INSTALL_LARAVEL_ENVOY=false +WORKSPACE_INSTALL_DEPLOYER=false +WORKSPACE_INSTALL_LINUXBREW=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_NODE_VERSION=stable From c112fdffc1598194eb4dcf5283e254c10742ee40 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 14:05:47 +0100 Subject: [PATCH 12/45] Updated PHP-FPM container to accept .env variables --- docker-compose.yml | 24 ++++++++++++------------ env-example | 10 +++++----- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 08f0a95a..49b0f51b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,18 +48,18 @@ services: build: context: ./php-fpm args: - - INSTALL_XDEBUG=false - - INSTALL_SOAP=false - - INSTALL_MONGO=false - - INSTALL_ZIP_ARCHIVE=false - - INSTALL_BCMATH=false - - INSTALL_PHPREDIS=false - - INSTALL_MEMCACHED=false - - INSTALL_OPCACHE=false - - INSTALL_EXIF=false - - INSTALL_AEROSPIKE_EXTENSION=false - - CODEIGNITER=false - dockerfile: Dockerfile-70 + - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} + - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} + - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} + - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE} + - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} + - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} + - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} + - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} + - INSTALL_EXIF=${PHP_FPM_DOCKER_FILE} + - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_DOCKER_FILE} + - CODEIGNITER=${PHP_FPM_DOCKER_FILE} + dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications expose: diff --git a/env-example b/env-example index 84c29181..f9e86531 100644 --- a/env-example +++ b/env-example @@ -41,18 +41,18 @@ WORKSPACE_SSH_PORT=2222 # PHP_FPM -PHP_FPM_BUILD_PATH=./php-fpm -PHP_FPM_CONTAINER_NAME=php-fpm PHP_FPM_DOCKER_FILE=Dockerfile-70 PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_MONGO=false +PHP_FPM_INSTALL_SOAP=false PHP_FPM_INSTALL_ZIP_ARCHIVE=false +PHP_FPM_INSTALL_BCMATH=false +PHP_FPM_INSTALL_PHPREDIS=false PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false +PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_CODEIGNITER=false -PHP_FPM_IDE_CONFIG=serverName=laravel - +PHP_FPM_CODEIGNITER=falses # NGINX NGINX_BUILD_PATH=./nginx From 356dc36fd57802e67b5f669b602943056ca8ca02 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 14:11:16 +0100 Subject: [PATCH 13/45] Added NGINX from env file and updated env-example --- docker-compose.yml | 6 +++--- env-example | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 49b0f51b..e3a9c966 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,9 +82,9 @@ services: - PHP_UPSTREAM=php-fpm volumes_from: - applications - volumes: - - ./logs/nginx/:/var/log/nginx - - ./nginx/sites/:/etc/nginx/sites-available + volumes: + - ${NGINX_HOST_LOG_PATH}:/var/log/nginx + - ${NGINX_SITES_PATH}:/etc/nginx/sites-available ports: - "80:80" - "443:443" diff --git a/env-example b/env-example index f9e86531..aa2a7310 100644 --- a/env-example +++ b/env-example @@ -39,7 +39,6 @@ WORKSPACE_NODE_VERSION=stable WORKSPACE_TIMEZONE=UTC WORKSPACE_SSH_PORT=2222 - # PHP_FPM PHP_FPM_DOCKER_FILE=Dockerfile-70 PHP_FPM_INSTALL_XDEBUG=false @@ -55,11 +54,11 @@ PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false PHP_FPM_CODEIGNITER=falses # NGINX -NGINX_BUILD_PATH=./nginx -NGINX_CONTAINER_NAME=nginx NGINX_HOST_HTTP_PORT=8080 NGINX_HOST_HTTPS_PORT=8433 NGINX_HOST_LOG_PATH=./logs/nginx/ +NGINX_SITES_PATH=./nginx/sites/ + # APACHE From 966a84fa39dce4074c082b6be160d5f3af779b8b Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 14:49:43 +0100 Subject: [PATCH 14/45] Fixed timezone issue in docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e3a9c966..073b0ff9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: - PGID=${WORKSPACE_PGID} - NODE_VERSION=${WORKSPACE_NODE_VERSION} - YARN_VERSION=${WORKSPACE_TIMEZONE} - - TZ=${WORKSPACE_TIMEZONE=UTC} + - TZ=${WORKSPACE_TIMEZONE} volumes_from: - applications extra_hosts: From f610aa63d16617f817c1b0015e3debb0b6426c28 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 27 Feb 2017 15:58:38 +0100 Subject: [PATCH 15/45] Removed reference to homestead --- docker-compose.yml | 4 ++-- mysql/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 073b0ff9..ba7df27f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -125,8 +125,8 @@ services: build: context: ./mysql args: - - MYSQL_DATABASE=homestead - - MYSQL_USER=homestead + - MYSQL_DATABASE=default + - MYSQL_USER=default - MYSQL_PASSWORD=secret - MYSQL_ROOT_PASSWORD=root volumes: diff --git a/mysql/Dockerfile b/mysql/Dockerfile index 420ddfaa..b483cc24 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -6,8 +6,8 @@ ADD startup /etc/mysql/startup RUN chown -R mysql:root /var/lib/mysql/ -ARG MYSQL_DATABASE=homestead -ARG MYSQL_USER=homestead +ARG MYSQL_DATABASE=default +ARG MYSQL_USER=default ARG MYSQL_PASSWORD=secret ARG MYSQL_ROOT_PASSWORD=root From a6e0338245b6a4b69eda9c00d49268f3f59f7ff8 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Wed, 1 Mar 2017 08:08:20 +0100 Subject: [PATCH 16/45] Removed Homestead reference in all DB containers --- docker-compose.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ba7df27f..48bb0e22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -143,8 +143,8 @@ services: ports: - "3306:3306" environment: - MYSQL_DATABASE: homestead - MYSQL_USER: homestead + MYSQL_DATABASE: default + MYSQL_USER: default MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: root @@ -157,8 +157,8 @@ services: ports: - "5432:5432" environment: - POSTGRES_DB: homestead - POSTGRES_USER: homestead + POSTGRES_DB: default + POSTGRES_USER: default POSTGRES_PASSWORD: secret ### PostgreSQL PostGis Container ############################ @@ -170,8 +170,8 @@ services: ports: - "5432:5432" environment: - POSTGRES_DB: homestead - POSTGRES_USER: homestead + POSTGRES_DB: default + POSTGRES_USER: default POSTGRES_PASSWORD: secret ### Neo4j Container ######################################### From 59dfacee13072c22a121bea4593b991d0c9d8c3c Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Wed, 1 Mar 2017 08:17:34 +0100 Subject: [PATCH 17/45] Removed homestead entirely this time --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 48bb0e22..8111bc56 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -296,7 +296,7 @@ services: build: ./phpmyadmin environment: PMA_ARBITRARY: 1 - MYSQL_USER: homestead + MYSQL_USER: default MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: root ports: From b45f39599643002305584beaa400d3cf649872e5 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Wed, 1 Mar 2017 08:29:17 +0100 Subject: [PATCH 18/45] Removed homestead entirely this time --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8111bc56..49f598f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -182,7 +182,7 @@ services: - "7474:7474" - "1337:1337" environment: - - NEO4J_AUTH=homestead:secret + - NEO4J_AUTH=default:secret volumes: - neo4j:/var/lib/neo4j/data From 8317fbde5ce16544a5686f26f19f1005867c77ae Mon Sep 17 00:00:00 2001 From: Riccardo Tribbia Date: Wed, 1 Mar 2017 15:55:33 +0100 Subject: [PATCH 19/45] - Eliminato .env dal repo git per poterlo linkare nel progetto locale - Impostata configurazione dinamica porte per apache --- .env | 1 - .gitignore | 1 + apache2/apache-config.conf | 8 ++++---- docker-compose.yml | 34 +++++++++++++++++----------------- 4 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index accd09a0..00000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -COMPOSE_CONVERT_WINDOWS_PATHS=1 diff --git a/.gitignore b/.gitignore index 7c6f11b7..00571d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea /logs /data +.env diff --git a/apache2/apache-config.conf b/apache2/apache-config.conf index 801be4ed..aede94e4 100644 --- a/apache2/apache-config.conf +++ b/apache2/apache-config.conf @@ -1,9 +1,9 @@ - + ServerAdmin me@mydomain.com - DocumentRoot /var/www/site - ServerName local.mydomain.com + DocumentRoot ${WEB_DOCUMENT_ROOT} + ServerName ${SERVER_ALIAS} - + Options Indexes FollowSymLinks MultiViews AllowOverride All Order deny,allow diff --git a/docker-compose.yml b/docker-compose.yml index 67af2244..53dd7178 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,8 +104,8 @@ services: volumes: - ./logs/apache2:/var/log/apache2 ports: - - "80:80" - - "443:443" + - "$SERVER_PORT:80" + - "$SERVER_SSL_PORT:443" links: - php-fpm @@ -126,14 +126,14 @@ services: build: context: ./mysql args: - - MYSQL_DATABASE=homestead - - MYSQL_USER=homestead - - MYSQL_PASSWORD=secret + - MYSQL_DATABASE=$DB_DATABASE + - MYSQL_USER=$DB_USERNAME + - MYSQL_PASSWORD=$DB_PASSWORD - MYSQL_ROOT_PASSWORD=root volumes: - mysql:/var/lib/mysql ports: - - "3306:3306" + - "$DB_PORT:3306" ### MariaDB Container ####################################### @@ -144,9 +144,9 @@ services: ports: - "3306:3306" environment: - MYSQL_DATABASE: homestead - MYSQL_USER: homestead - MYSQL_PASSWORD: secret + MYSQL_DATABASE: $DB_DATABASE + MYSQL_USER: $DB_USERNAME + MYSQL_PASSWORD: $DB_PASSWORD MYSQL_ROOT_PASSWORD: root ### PostgreSQL Container #################################### @@ -158,9 +158,9 @@ services: ports: - "5432:5432" environment: - POSTGRES_DB: homestead - POSTGRES_USER: homestead - POSTGRES_PASSWORD: secret + POSTGRES_DB: $DB_DATABASE + POSTGRES_USER: $DB_USERNAME + POSTGRES_PASSWORD: $DB_PASSWORD ### PostgreSQL PostGis Container ############################ @@ -171,9 +171,9 @@ services: ports: - "5432:5432" environment: - POSTGRES_DB: homestead - POSTGRES_USER: homestead - POSTGRES_PASSWORD: secret + POSTGRES_DB: $DB_DATABASE + POSTGRES_USER: $DB_USERNAME + POSTGRES_PASSWORD: $DB_PASSWORD ### Neo4j Container ######################################### @@ -297,8 +297,8 @@ services: build: ./phpmyadmin environment: PMA_ARBITRARY: 1 - MYSQL_USER: homestead - MYSQL_PASSWORD: secret + MYSQL_USER: $DB_USERNAME + MYSQL_PASSWORD: $DB_PASSWORD MYSQL_ROOT_PASSWORD: root ports: - "8080:80" From 6be81f05c2a781faec04554402a58fd94759ae98 Mon Sep 17 00:00:00 2001 From: Riccardo Tribbia Date: Thu, 2 Mar 2017 12:14:38 +0100 Subject: [PATCH 20/45] - Aggiunto servizio php-worker per avviamento queue --- docker-compose.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 53dd7178..a74b57cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,6 +74,16 @@ services: # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel` - PHP_IDE_CONFIG=serverName=laravel +### PHP-WORKER Container ####################################### + + php-worker: + build: + context: ./php-fpm + dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting + volumes_from: + - applications + command: php artisan queue:work + ### Nginx Server Container ################################## nginx: From 0983cc98fee38947baa94f84deaf19f02a45f24e Mon Sep 17 00:00:00 2001 From: Wayan Jimmy Date: Sat, 4 Mar 2017 02:07:29 +0800 Subject: [PATCH 21/45] Setup mailhog --- docker-compose.yml | 6 ++++++ mailhog/Dockerfile | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 mailhog/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 38409666..dd731457 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -299,6 +299,12 @@ services: links: - php-fpm + mailhog: + build: ./mailhog + ports: + - "1025:1025" + - "8025:8025" + ### Volumes Setup ########################################### volumes: diff --git a/mailhog/Dockerfile b/mailhog/Dockerfile new file mode 100644 index 00000000..9fd31e4e --- /dev/null +++ b/mailhog/Dockerfile @@ -0,0 +1,7 @@ +FROM mailhog/mailhog + +Maintainer Mahmoud Zalt + +CMD ["Mailhog"] + +EXPOSE 1025 8025 From 603010cbd50853826fda09639e4ccbf491111eac Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 09:03:12 +0100 Subject: [PATCH 22/45] Split up mysqli and tokenizer --- docker-compose.yml | 7 ++++--- env-example | 3 ++- php-fpm/Dockerfile-56 | 19 ++++++++++++++----- php-fpm/Dockerfile-70 | 19 ++++++++++++++----- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 49f598f8..f9d07779 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,9 +56,10 @@ services: - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - - INSTALL_EXIF=${PHP_FPM_DOCKER_FILE} - - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_DOCKER_FILE} - - CODEIGNITER=${PHP_FPM_DOCKER_FILE} + - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} + - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} + - INSTALL_MYSQLI=${PHP_FPM_MYSQLI} + - INSTALL_TOKENIZER=${PHP_FPM_TOKENIZER} dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications diff --git a/env-example b/env-example index aa2a7310..d95f208f 100644 --- a/env-example +++ b/env-example @@ -51,7 +51,8 @@ PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_CODEIGNITER=falses +PHP_FPM_MYSQLI=false +PHP_FPM_TOKENIZER=false # NGINX NGINX_HOST_HTTP_PORT=8080 diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index acd02b80..bb80842e 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -142,13 +142,22 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### -# Codeigniter Modifications: +# Mysqli Modifications: ##################################### -ARG CODEIGNITER=false -RUN if [ ${CODEIGNITER} = true ]; then \ - # Install Codeigniter PHP extentions requirements - docker-php-ext-install mysqli && \ +ARG INSTALL_MYSQLI=false +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + # Install mysqli PHP extentions requirements + docker-php-ext-install mysqli && \ +;fi + +##################################### +# Tokenizer Modifications: +##################################### + +ARG INSTALL_TOKENIZER=false +RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ + # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 20aaf5a9..c529fbb2 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -176,13 +176,22 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### -# Codeigniter Modifications: +# Mysqli Modifications: ##################################### -ARG CODEIGNITER=false -RUN if [ ${CODEIGNITER} = true ]; then \ - # Install Codeigniter PHP extentions requirements - docker-php-ext-install mysqli && \ +ARG INSTALL_MYSQLI=false +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + # Install mysqli PHP extentions requirements + docker-php-ext-install mysqli && \ +;fi + +##################################### +# Tokenizer Modifications: +##################################### + +ARG INSTALL_TOKENIZER=false +RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ + # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi From 46fcb9e09c22592f8dcbc449de063dad829a6a0d Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 09:31:11 +0100 Subject: [PATCH 23/45] Fixed php-fpm variables and example --- docker-compose.yml | 6 +++--- env-example | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 49f598f8..e5fa0439 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,9 +56,9 @@ services: - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - - INSTALL_EXIF=${PHP_FPM_DOCKER_FILE} - - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_DOCKER_FILE} - - CODEIGNITER=${PHP_FPM_DOCKER_FILE} + - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} + - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} + - CODEIGNITER=${PHP_FPM_CODEIGNITER} dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications diff --git a/env-example b/env-example index aa2a7310..6c608125 100644 --- a/env-example +++ b/env-example @@ -51,7 +51,7 @@ PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_CODEIGNITER=falses +PHP_FPM_CODEIGNITER=false # NGINX NGINX_HOST_HTTP_PORT=8080 From 1d918a71d8e5765bfe7a127d3e59d8e99af75209 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 22:20:31 +0100 Subject: [PATCH 24/45] fixed example and docker-compose.yml --- docker-compose.yml | 4 ++-- env-example | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f9d07779..51101e84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,8 +58,8 @@ services: - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} - - INSTALL_MYSQLI=${PHP_FPM_MYSQLI} - - INSTALL_TOKENIZER=${PHP_FPM_TOKENIZER} + - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} + - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications diff --git a/env-example b/env-example index d95f208f..3ecca97a 100644 --- a/env-example +++ b/env-example @@ -51,8 +51,8 @@ PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_MYSQLI=false -PHP_FPM_TOKENIZER=false +PHP_FPM_INSTALL_MYSQLI=false +PHP_FPM_INSTALL_TOKENIZER=false # NGINX NGINX_HOST_HTTP_PORT=8080 From 25c27685577388885fa1f50faad311d3c828dcf3 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 22:26:17 +0100 Subject: [PATCH 25/45] Apache should just go to /var/www not /var/www/public when supporting multiple projects --- apache2/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2/Dockerfile b/apache2/Dockerfile index 569ba9f3..97636ed9 100644 --- a/apache2/Dockerfile +++ b/apache2/Dockerfile @@ -6,11 +6,11 @@ ARG PHP_SOCKET=php-fpm:9000 ENV WEB_PHP_SOCKET=$PHP_SOCKET -ENV WEB_DOCUMENT_ROOT=/var/www/public +ENV WEB_DOCUMENT_ROOT=/var/www/ EXPOSE 80 443 -WORKDIR /var/www/public +WORKDIR /var/www/ ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"] From 048b55186e0a52c3aeabcf301bdb0d6fdbb4e068 Mon Sep 17 00:00:00 2001 From: Thor Erik Lie Date: Wed, 8 Mar 2017 09:26:08 +0100 Subject: [PATCH 26/45] Fix issue 619 --- nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 97e5a0ed..88bc7609 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -25,6 +25,6 @@ http { gzip_disable "msie6"; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-available/*; - open_file_cache max=100; + open_file_cache off; # Disabled for issue 619 charset UTF-8; } From 36fcc6674e88ca98ada6d0e94e1bc329e4d3bdfd Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Thu, 9 Mar 2017 09:29:07 +0100 Subject: [PATCH 27/45] Seperated mysqli and tokenizer as seperate options without putting them under code igniter --- docker-compose.yml | 2 +- php-fpm/Dockerfile-56 | 6 ++---- php-fpm/Dockerfile-70 | 7 ++----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 27ae21b2..e9254784 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: applications: image: tianon/true volumes: - - ${APPLICATIONS_HOST_DIR}:/var/www + - ${APPLICATIONS_HOST_DIR}:/var/www ### Workspace Utilities Container ########################### diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 1775cf61..6c63d72d 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -149,9 +149,8 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### ARG INSTALL_MYSQLI=false -RUN if [ ${INSTALL_MYSQLI} = true ]; then \ - # Install mysqli PHP extentions requirements - docker-php-ext-install mysqli && \ +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + docker-php-ext-install mysqli \ ;fi ##################################### @@ -160,7 +159,6 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \ ARG INSTALL_TOKENIZER=false RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ - # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index c529fbb2..d0ddaf09 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -178,11 +178,9 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### # Mysqli Modifications: ##################################### - ARG INSTALL_MYSQLI=false -RUN if [ ${INSTALL_MYSQLI} = true ]; then \ - # Install mysqli PHP extentions requirements - docker-php-ext-install mysqli && \ +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + docker-php-ext-install mysqli \ ;fi ##################################### @@ -191,7 +189,6 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \ ARG INSTALL_TOKENIZER=false RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ - # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi From 1a80385a4812c826d4d93df5a82b48635479abae Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Fri, 10 Mar 2017 13:48:13 -0500 Subject: [PATCH 28/45] change some desgins in the docs site --- docs/_settings/config.toml | 12 +- docs/_settings/content/contributing/index.md | 4 +- .../exampleSite/config.toml | 78 ------ .../content/adding-content/index.md | 61 ----- .../content/getting-started/index.md | 240 ------------------ .../exampleSite/content/index.md | 55 ---- .../exampleSite/content/license/index.md | 27 -- .../exampleSite/content/roadmap/index.md | 27 -- .../exampleSite/static/.gitkeep | 0 .../hugo-material-docs/layouts/index.html | 4 +- .../layouts/partials/drawer.html | 50 ++-- .../layouts/partials/header.html | 7 +- docs/contributing/index.html | 69 ++--- docs/contributing/index.xml | 8 +- docs/documentation/index.html | 95 ++++--- docs/documentation/index.xml | 34 ++- docs/getting-started/index.html | 65 ++--- docs/getting-started/index.xml | 4 +- docs/help/index.html | 65 ++--- docs/help/index.xml | 4 +- docs/index.html | 108 ++++---- docs/index.xml | 39 ++- docs/introduction/index.html | 66 ++--- docs/introduction/index.xml | 5 +- docs/license/index.html | 65 ++--- docs/license/index.xml | 4 +- docs/related-projects/index.html | 65 ++--- docs/related-projects/index.xml | 4 +- 28 files changed, 377 insertions(+), 888 deletions(-) delete mode 100755 docs/_settings/themes/hugo-material-docs/exampleSite/config.toml delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep diff --git a/docs/_settings/config.toml b/docs/_settings/config.toml index 67fda545..d204953d 100644 --- a/docs/_settings/config.toml +++ b/docs/_settings/config.toml @@ -1,7 +1,7 @@ baseurl = "http://laradock.io/" languageCode = "en-us" publishDir = "../" -title = "Laradock Docs" +title = "Laradock" theme = "hugo-material-docs" metadataformat = "yaml" canonifyurls = true @@ -15,8 +15,8 @@ googleAnalytics = "UA-37514928-9" copyright = "" # Repository - provider = "GitHub" - repo_url = "https://github.com/laradock/laradock" + provider = "" + repo_url = "" version = "" logo = "" @@ -32,8 +32,8 @@ googleAnalytics = "UA-37514928-9" highlight_css = "" [params.palette] - primary = "purple" - accent = "deep-purple" + primary = "deep-purple" + accent = "purple" [params.font] text = "Doctarine" @@ -41,7 +41,7 @@ googleAnalytics = "UA-37514928-9" [social] twitter = "" - github = "laradock" + github = "laradock/laradock" email = "" # ------- MENU START ----------------------------------------- diff --git a/docs/_settings/content/contributing/index.md b/docs/_settings/content/contributing/index.md index 7e8c8df2..4631aa7a 100644 --- a/docs/_settings/content/contributing/index.md +++ b/docs/_settings/content/contributing/index.md @@ -19,7 +19,7 @@ submitting an [Issue](https://github.com/laradock/laradock/issues). Even better You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request. -## Edit the documentation +## Update Documentation (Site) Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly. @@ -30,7 +30,7 @@ Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Ma 4. Delete everything except the `_settings` folder & the `CNAME` file. 5. Open `docs/_settings` from your terminal and run `hugo serve` to host the website locally. 6. Open the `docs/_settings/content` and search for the folder of the section you want to edit. -7. In each secion there's an `index.md` file, that's the file you need to edit. +7. In each section there's an `index.md` file, that's the file you need to edit. 8. To edit the sidebar (in case you are adding new section) go to `docs/_settings/config.toml` and add the section there. 9. After done editing, run the this command `hugo` to generate the updated site inside the `docs` folder. 10. Go back to the project root directory, commit and push.. diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml b/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml deleted file mode 100755 index 85c63523..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml +++ /dev/null @@ -1,78 +0,0 @@ -baseurl = "https://example.org/" -languageCode = "en-us" -title = "Material Docs" -theme = "hugo-material-docs" -metadataformat = "yaml" -canonifyurls = true -# Enable Google Analytics by entering your tracking id -googleAnalytics = "" - -[params] - # General information - author = "Digitalcraftsman" - description = "A material design theme for documentations." - copyright = "Released under the MIT license" - - # Repository - provider = "GitHub" - repo_url = "https://github.com/digitalcraftsman/hugo-material-docs" - - version = "1.0.0" - logo = "images/logo.png" - favicon = "" - - permalink = "#" - - # Custom assets - custom_css = [] - custom_js = [] - - # Syntax highlighting theme - highlight_css = "" - - [params.palette] - primary = "red" - accent = "teal" - - [params.font] - text = "Ubuntu" - code = "Ubuntu Mono" - - -[social] - twitter = "" - github = "digitalcraftsman" - email = "hello@email.com" - - -[[menu.main]] - name = "Material" - url = "/" - weight = 0 - -[[menu.main]] - name = "Getting started" - url = "getting-started/" - weight = 10 - -[[menu.main]] - name = "Adding content" - url = "adding-content/" - weight = 20 - -[[menu.main]] - name = "Roadmap" - url = "roadmap/" - weight = 30 - -[[menu.main]] - name = "License" - url = "license/" - weight = 40 - - -[blackfriday] - smartypants = true - fractions = true - smartDashes = true - plainIDAnchors = true diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md deleted file mode 100644 index 2fce91e3..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -date: 2016-03-09T19:56:50+01:00 -title: Adding content -weight: 20 ---- - -## Hello world - -Let's create our first content file for your documentation. Open a terminal and add the following command for each new file you want to add. Replace `` with a general term that describes your document in detail. - -```sh -hugo new /filename.md -``` - -Visitors of your website will find the final document under `www.example.com//filename/`. - -Since it's possible to have multiple content files in the same section I recommend to create at least one `index.md` file per section. This ensures that users will find an index page under `www.example.com/`. - -## Homepage - -To add content to the homepage you need to add a small indicator to the frontmatter of the content file: - -```toml -type: index -``` - -Otherwise the theme will not be able to find the corresponding content file. - -## Table of contents - -You maybe noticed that the menu on the left contains a small table of contents of the current page. All `

` tags (`## Headline` in Markdown) will be added automatically. - -## Admonitions - -Admonition is a handy feature that adds block-styled side content to your documentation, for example hints, notes or warnings. It can be enabled by using the corresponding [shortcodes](http://gohugo.io/extras/shortcodes/) inside your content: - -```go -{{}} -Nothing to see here, move along. -{{}} -``` - -This will print the following block: - -{{< note title="Note" >}} -Nothing to see here, move along. -{{< /note >}} - -The shortcode adds a neutral color for the note class and a red color for the warning class. You can also add a custom title: - -```go -{{}} -Nothing to see here, move along. -{{}} -``` - -This will print the following block: - -{{< warning title="Don't try this at home" >}} -Nothing to see here, move along. -{{< /warning >}} diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md deleted file mode 100644 index e501c04b..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -date: 2016-03-09T00:11:02+01:00 -title: Getting started -weight: 10 ---- - -## Installation - -### Installing Hugo - -Hugo itself is just a single binary without dependencies on expensive runtimes like Ruby, Python or PHP and without dependencies on any databases. You just need to download the [latest version](https://github.com/spf13/hugo/releases). For more information read the official [installation guides](http://gohugo.io/overview/installing/). - -Let's make sure Hugo is set up as expected. You should see a similar version number in your terminal: - -```sh -hugo version -# Hugo Static Site Generator v0.15 BuildDate: 2016-01-03T12:47:47+01:00 -``` - -### Installing Material - -Next, assuming you have Hugo up and running the `hugo-material-docs` theme can be installed with `git`: - -```sh -# create a new Hugo website -hugo new site my-awesome-docs - -# move into the themes folder of your website -cd my-awesome-docs/themes/ - -# download the theme -git clone git@github.com:digitalcraftsman/hugo-material-docs.git -``` - -## Setup - -Next, take a look in the `exampleSite` folder at `themes/hugo-material-docs/`. This directory contains an example config file and the content that you are currently reading. It serves as an example setup for your documentation. - -Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary. - -Hugo includes a development server, so you can view your changes as you go - -very handy. Spin it up with the following command: - -``` sh -hugo server -``` - -Now you can go to [localhost:1313](http://localhost:1313) and the Material -theme should be visible. You can now start writing your documentation, or read -on and customize the theme through some options. - -## Configuration - -Before you are able to deploy your documentation you should take a few minute to adjust some information in the `config.toml`. Open the file in an editor: - -```toml -baseurl = "https://example.com/" -languageCode = "en-us" -title = "Material Docs" - -[params] - # General information - author = "Digitalcraftsman" - description = "A material design theme for documentations." - copyright = "Released under the MIT license" -``` - -## Options - -### Github integration - -If your project is hosted on GitHub, add the repository link to the -configuration. If the `provider` equals **GitHub**, the Material theme will -add a download and star button, and display the number of stars: - -```toml -[params] - # Repository - provider = "GitHub" - repo_url = "https://github.com/digitalcraftsman/hugo-material-docs" -``` - -### Adding a version - -In order to add the current version next to the project banner inside the -drawer, you can set the variable `version`: - -```toml -[params] - version = "1.0.0" -``` - -This will also change the link behind the download button to point to the -archive with the respective version on GitHub, assuming a release tagged with -this exact version identifier. - -### Adding a logo - -If your project has a logo, you can add it to the drawer/navigation by defining -the variable `logo`. Ideally, the image of your logo should have -rectangular shape with a minimum resolution of 128x128 and leave some room -towards the edges. The logo will also be used as a web application icon on iOS. -Either save your logo somewhere in the `static/` folder and reference the file relative to this location or use an external URL: - -```toml -[params] - logo = "images/logo.png" -``` - -### Adding a custom favicon - -Favicons are small small icons that are displayed in the tabs right next to the title of the current page. As with the logo above you need to save your favicon in `static/` and link it relative to this folder or use an external URL: - -```toml -[params] - favicon = "favicon.ico" -``` - -### Google Analytics - -You can enable Google Analytics by replacing `UA-XXXXXXXX-X` with your own tracking code. - -```toml -googleAnalytics = "UA-XXXXXXXX-X" -``` - -### Small tweaks - -This theme provides a simple way for making small adjustments, that is changing -some margins, centering text, etc. The `custom_css` and `custom_js` option allow you to add further CSS and JS files. They can either reside locally in the `/static` folder or on an external server, e.g. a CDN. In both cases use either the relative path to `/static` or the absolute URL to the external ressource. - - -```toml -[params] - # Custom assets - custom_css = [ - "foo.css", - "bar.css" - ] - - custom_js = ["buzz.js"] -``` - -### Changing the color palette - -Material defines a default hue for every primary and accent color on Google's -material design [color palette][]. This makes it very easy to change the overall look of the theme. Just set the variables `palette.primary` and `palette.accent` to one of the colors defined in the palette: - -```toml -[params.palette] - primary = "red" - accent = "light-green" -``` - -Color names can be written upper- or lowercase but must match the names of the -material design [color palette](http://www.materialui.co/colors). Valid values are: _red_, _pink_, _purple_, _deep purple_, _indigo_, _blue_, _light-blue_, _cyan_, _teal_, _green_, _light-green_, -_lime_, _yellow_, _amber_, _orange_, _deep-orange_, _brown_, _grey_ and -_blue-grey_. The last three colors can only be used as a primary color. - -![Color palette](/images/colors.png) - -If the color is set via this configuration, an additional CSS file called -`palettes.css` is included that defines the color palettes. - -### Changing the font family - -Material uses the [Ubuntu font family](http://font.ubuntu.com) by default, specifically the regular sans-serif type for text and the monospaced type for code. Both fonts are loaded from [Google Fonts](https://www.google.com/fonts) and can be easily changed to other fonts, like for example Google's own [Roboto font](https://www.google.com/fonts/specimen/Roboto): - -```toml -[params.font] - text = "Roboto" - code = "Roboto Mono" -``` - -The text font will be loaded in font-weights 400 and **700**, the monospaced -font in regular weight. - -### Syntax highlighting - -This theme uses the popular [Highlight.js](https://highlightjs.org/) library to colorize code examples. The default theme is called `Github` with a few small tweaks. You can link our own theme if you like. Again, store your stylesheet in the `static/` folder and set the relative path in the config file: - -```toml -[params] - # Syntax highlighting theme - highlight_css = "path/to/theme.css" -``` - -### Adding a GitHub and Twitter account - -If you have a GitHub and/or Twitter account, you can add links to your -accounts to the drawer by setting the variables `github` and -`twitter` respectively: - -``` toml -[social] - twitter = "" - github = "digitalcraftsman" -``` - -### Adding menu entries - -Once you created your first content files you can link them manually in the sidebar on the left. A menu entry has the following schema: - -```toml -[[menu.main]] - name = "Material" - url = "/" - weight = 0 - pre = "" -``` - -`name` is the title displayed in the menu and `url` the relative URL to the content. The `weight` attribute allows you to modify the order of the menu entries. A menu entry appears further down the more weight you add. The `pre` attribute is optional and allows you to *pre*pend elements to a menu link, e.g. an icon. - -Instead of just linking a single file you can enhance the sidebar by creating a nested menu. This way you can list all pages of a section instead of linking them one by one (without nesting). - -You need extend the frontmatter of each file content file in a section slightly. The snippet below registers this content file as 'child' of a menu entry that already exists. - -```yaml -menu: - main: - parent: Material - identifier: - weight: 0 -``` - -`main` specifies to which menu the content file should be added. `main` is the only menu in this theme by default. `parent` let's you register this content file to an existing menu entry, in this case the `Material` link. Note that the parent in the frontmatter needs to match the name in `config.toml`. - -`identifier` is the link that is shown in the menu. Ideally you choose the same name for the `identifier` and the `title` of the page. Again, `weight` allows you to change the order of the nested links in a section. - -### Markdown extensions - -Hugo uses [Blackfriday](https://github.com/russross/blackfriday) to process your content. For a detailed description of all options take a look at the [Blackfriday configuration](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering) section in the Hugo documentation. - -```toml -[blackfriday] - smartypants = true - fractions = true - smartDashes = true - plainIDAnchors = true -``` diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md deleted file mode 100644 index a48262ed..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -date: 2016-03-08T21:07:13+01:00 -title: Material for Hugo -type: index -weight: 0 ---- - -## Beautiful documentation - -Material is a theme for [Hugo](https://gohugo.io), a fast and flexible static site generator. It is built using Google's [material design](https://www.google.com/design/spec/material-design/introduction.html) -guidelines, fully responsive, optimized for touch and pointer devices as well -as all sorts of screen sizes. - -![Material Screenshot](/images/screen.png) - -Material is very lightweight – it is built from scratch using Javascript and -CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts -and Analytics). Yet, it is highly customizable and degrades gracefully in older -browsers. - -## Quick start - -Install with `git`: - -```sh -git clone git@github.com:digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs -``` - -## Features - -- Beautiful, readable and very user-friendly design based on Google's material - design guidelines, packed in a full responsive template with a well-defined - and [easily customizable color palette]({{< relref "getting-started/index.md#changing-the-color-palette" >}}), great typography, as well as a - beautiful search interface and footer. - -- Well-tested and optimized Javascript and CSS including a cross-browser - fixed/sticky header, a drawer that even works without Javascript using - the [checkbox hack](http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/) with fallbacks, responsive tables that scroll when - the screen is too small and well-defined print styles. - -- Extra configuration options like a [project logo]({{< relref "getting-started/index.md#adding-a-logo" >}}), links to the authors - [GitHub and Twitter accounts]({{< relref "getting-started/index.md#adding-a-github-and-twitter-account" >}}) and display of the amount of stars the - project has on GitHub. - -- Web application capability on iOS – when the page is saved to the homescreen, - it behaves and looks like a native application. - -See the [getting started guide]({{< relref "getting-started/index.md" >}}) for instructions how to get -it up and running. - -## Acknowledgements - -Last but not least a big thank you to [Martin Donath](https://github.com/squidfunk). He created the original [Material theme](https://github.com/squidfunk/mkdocs-material) for Hugo's companion [MkDocs](http://www.mkdocs.org/). This port wouldn't be possible without him. - -Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project. diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md deleted file mode 100644 index 2758c652..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -date: 2016-03-09T20:10:46+01:00 -title: License -weight: 40 ---- - -Copyright (c) 2016 Digitalcraftsman
-Copyright (c) 2016 Martin Donath - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md deleted file mode 100644 index ea6f2522..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -date: 2016-03-09T20:08:11+01:00 -title: Roadmap -weight: 30 ---- - -Quo vadis? The port of the original [Material theme](https://github.com/squidfunk/mkdocs-material) has replicated nearly all of its features. A few are still missing but I've good news: the Hugo community is actively working on this issues. Maybe with the next release of Hugo we can abandon this list. Stay tuned. - -## Localization - -Currently, it is possible to collect all strings in a single place for easy customization. However, this only enables you to define all strings in a single language. This approach is quite limiting in terms of localization support. Therefore, I decided to wait for a native integration. This way we can avoid a second setup of all strings in your website. - -Keep an eye on [#1734](https://github.com/spf13/hugo/issues/1734). - -## Search - -Beside third-party services, some hacky workarounds and Grunt-/Gulp-based scripts that only require unnecessary dependencies, future versions of Hugo will support the generation of a content index as a core feature. - -This approach plays well with this theme since MkDocs does the same. - -Keep an eye on [#1853](https://github.com/spf13/hugo/pull/1853). - -## Contributing - -Did you found an bug or you would like to suggest a new feature? I'm open for feedback. Please open a new [issue](https://github.com/digitalcraftsman/hugo-material-docs/issues) and let me know. - -You're also welcome to contribute with [pull requests](https://github.com/digitalcraftsman/hugo-material-docs/pulls). diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep b/docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/_settings/themes/hugo-material-docs/layouts/index.html b/docs/_settings/themes/hugo-material-docs/layouts/index.html index cabbd580..703e7e8c 100644 --- a/docs/_settings/themes/hugo-material-docs/layouts/index.html +++ b/docs/_settings/themes/hugo-material-docs/layouts/index.html @@ -37,7 +37,9 @@ Documentation built with Hugo using the - Material theme. + Material theme, + by + Mahmoud Zalt.