From 4947dfaad1b158529396926e1ae6a606116596c4 Mon Sep 17 00:00:00 2001 From: Riccardo Tribbia Date: Sat, 25 Feb 2017 21:25:33 +0100 Subject: [PATCH 1/3] - 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 569ba9f..21373f5 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 0000000..801be4e --- /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 8317fbde5ce16544a5686f26f19f1005867c77ae Mon Sep 17 00:00:00 2001 From: Riccardo Tribbia Date: Wed, 1 Mar 2017 15:55:33 +0100 Subject: [PATCH 2/3] - 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 accd09a..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -COMPOSE_CONVERT_WINDOWS_PATHS=1 diff --git a/.gitignore b/.gitignore index 7c6f11b..00571d7 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 801be4e..aede94e 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 67af224..53dd717 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 3/3] - 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 53dd717..a74b57c 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: