-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from viralsolani/develop
Fix Misc Issues
- Loading branch information
Showing
27 changed files
with
626 additions
and
514 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,54 +1,51 @@ | ||
version: '3' | ||
version: "3" | ||
|
||
services: | ||
app: | ||
image: inshastri/laravel-adminpanel:latest | ||
image: lap-www | ||
container_name: lap-www | ||
build: | ||
context: ./docker/app | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- 80:80 | ||
- 8080:8080 | ||
links: | ||
- mysql | ||
- redis | ||
environment: | ||
DB_HOST: mysql | ||
DB_DATABASE: laravel_docker | ||
DB_USERNAME: root | ||
DB_PASSWORD: toor | ||
REDIS_HOST: redis | ||
SESSION_DRIVER: redis | ||
CACHE_DRIVER: redis | ||
networks: | ||
- testservice_bridge2 | ||
mysql: | ||
image: mysql:5 | ||
volumes: | ||
- ./data:/var/lib/mysql | ||
ports: | ||
- 3306:3306 | ||
- .:/var/www/html/ | ||
mysql: | ||
container_name: lap-mysql | ||
image: mysql:5.7 | ||
restart: always | ||
ports: | ||
- 13306:3306 | ||
volumes: | ||
- mysql:/var/lib/mysql | ||
environment: | ||
MYSQL_ROOT_PASSWORD: toor | ||
MYSQL_DATABASE: laravel_docker | ||
networks: | ||
- testservice_bridge2 | ||
MYSQL_DATABASE: laravel-admin-panel | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_USER: admin | ||
MYSQL_PASSWORD: admin | ||
redis: | ||
image: redis:4.0-alpine | ||
container_name: lap-redis | ||
image: redis:4-alpine | ||
restart: always | ||
ports: | ||
- 6379:6379 | ||
networks: | ||
- testservice_bridge2 | ||
- 16379:6379 | ||
volumes: | ||
- redis:/data | ||
phpmyadmin: | ||
container_name: lap-phpmyadmin | ||
image: phpmyadmin/phpmyadmin | ||
restart: always | ||
ports: | ||
- 8081:80 | ||
links: | ||
- mysql | ||
environment: | ||
PMA_PORT: 3306 | ||
PMA_HOST: mysql | ||
PMA_USER: root | ||
PMA_PASSWORD: toor | ||
ports: | ||
- "8005:80" | ||
restart: always | ||
depends_on: | ||
- mysql | ||
networks: | ||
- testservice_bridge2 | ||
networks: | ||
testservice_bridge2: | ||
|
||
volumes: | ||
mysql: | ||
driver: "local" | ||
redis: | ||
driver: "local" |
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,77 @@ | ||
FROM php:7.2-apache-stretch | ||
|
||
ENV LARAVEL_VERSION 5.8 | ||
ENV INSTALL_DIR /var/www/html | ||
ENV COMPOSER_HOME /var/www/.composer/ | ||
|
||
# Install common tools and libraries | ||
RUN apt-get update && apt-get install -y \ | ||
cron \ | ||
git \ | ||
gzip \ | ||
libfreetype6-dev \ | ||
libicu-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libxslt1-dev \ | ||
libmagickwand-dev \ | ||
lsof \ | ||
mysql-client \ | ||
vim \ | ||
zip \ | ||
unzip \ | ||
curl \ | ||
openssl \ | ||
libssl-dev \ | ||
libcurl4-openssl-dev | ||
|
||
RUN pecl install imagick-3.4.3 | ||
|
||
# http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html | ||
RUN docker-php-ext-install bcmath \ | ||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | ||
&& docker-php-ext-install gd \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install mbstring \ | ||
&& docker-php-ext-install opcache \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-install zip \ | ||
&& docker-php-ext-install xml \ | ||
&& docker-php-ext-install ctype \ | ||
&& docker-php-ext-install json \ | ||
&& docker-php-ext-enable imagick \ | ||
&& docker-php-ext-install bz2 \ | ||
&& docker-php-ext-install exif | ||
|
||
# Install Node, Npm | ||
RUN apt-get install -y gnupg \ | ||
&& curl -sL https://deb.nodesource.com/setup_11.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& mkdir /var/www/.config /var/www/.npm | ||
|
||
# Install Composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
# Make sure the volume mount point is empty | ||
RUN rm -rf /var/www/html/* | ||
|
||
# Set www-data as owner for /var/www | ||
RUN chown -R www-data:www-data /var/www/ | ||
RUN chmod -R g+w /var/www/ | ||
|
||
# add apache modules and configuration | ||
RUN a2enmod rewrite \ | ||
&& a2enmod headers \ | ||
&& a2enmod expires \ | ||
&& echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini | ||
|
||
# Remove unnecssary modules | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# copy project files | ||
COPY . /var/www/html | ||
COPY vhost.conf /etc/apache2/sites-available/000-default.conf | ||
|
||
|
||
WORKDIR $INSTALL_DIR |
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,13 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot /var/www/html/public | ||
|
||
<Directory /var/www/html/public> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
|
||
ErrorLog /var/www/html/error.log | ||
CustomLog /var/www/html/access.log combined | ||
</VirtualHost> | ||
|
||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
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,2 @@ | ||
#!/bin/bash | ||
docker/cli bash |
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,3 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
docker-compose exec app "$@" |
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,3 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
docker-compose exec -T app "$@" |
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,2 @@ | ||
#!/bin/bash | ||
docker/cli composer "$@" |
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,10 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a directory or file to copy from container (ex. vendor, --all)" && exit | ||
|
||
if [ "$1" == "--all" ]; then | ||
docker cp $(docker-compose ps -q app|awk '{print $1}'):/var/www/html/./ src/ | ||
echo "Completed copying all files from container to host" | ||
else | ||
docker cp $(docker-compose ps -q app|awk '{print $1}'):/var/www/html/$1 src/ | ||
echo "Completed copying $1 from container to host" | ||
fi |
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,12 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a directory or file to copy to container (ex. vendor, --all)" && exit | ||
|
||
if [ "$1" == "--all" ]; then | ||
docker cp src/./ $(docker-compose ps -q app|awk '{print $1}'):/var/www/html/ | ||
echo "Completed copying all files from host to container" | ||
else | ||
docker cp src/$1 $(docker-compose ps -q app|awk '{print $1}'):/var/www/html/ | ||
echo "Completed copying $1 from host to container" | ||
fi | ||
|
||
docker/fixowns |
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,3 @@ | ||
#!/bin/bash | ||
echo "Correcting filesystem ownerships..." | ||
docker/rootnotty chown -R www-data:www-data /var/www/ |
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 | ||
echo "Correcting filesystem permissions..." | ||
|
||
docker/clinotty find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; | ||
docker/clinotty find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; | ||
docker/clinotty chmod u+x docker/magento | ||
|
||
echo "Filesystem permissions corrected." |
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,2 @@ | ||
#!/bin/bash | ||
docker/cli node_modules/grunt/bin/grunt "$@" |
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,2 @@ | ||
#!/bin/bash | ||
docker/cli node "$@" |
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,2 @@ | ||
#!/bin/bash | ||
docker/cli npm "$@" |
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,3 @@ | ||
#!/bin/bash | ||
docker/stop | ||
docker/start |
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,3 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
docker-compose exec -u root -T app "$@" |
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,2 @@ | ||
#!/bin/bash | ||
docker-compose -f docker-compose.yml up -d |
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,2 @@ | ||
#!/bin/bash | ||
docker-compose stop |
Oops, something went wrong.