Skip to content

Commit eb64611

Browse files
authored
Merge pull request #478 from viralsolani/develop
Fix Misc Issues
2 parents 4b21093 + 51f1f0f commit eb64611

27 files changed

+626
-514
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"hieu-le/active": "^3.5",
2323
"laravel/framework": "5.8.*",
2424
"laravel/passport": "^7.2",
25-
"laravel/socialite": "^3.0",
25+
"laravel/socialite": "^4.1",
2626
"laravel/tinker": "~1.0",
2727
"laravelcollective/html": "^5.4.0",
2828
"spatie/laravel-cors": "^1.2",

composer.lock

Lines changed: 320 additions & 274 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/Dockerfile

Lines changed: 0 additions & 104 deletions
This file was deleted.

deploy/vhost.conf

Lines changed: 0 additions & 11 deletions
This file was deleted.

docker-compose.yml

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,51 @@
1-
version: '3'
1+
version: "3"
2+
23
services:
34
app:
4-
image: inshastri/laravel-adminpanel:latest
5+
image: lap-www
6+
container_name: lap-www
7+
build:
8+
context: ./docker/app
9+
dockerfile: Dockerfile
10+
restart: always
511
ports:
612
- 80:80
7-
- 8080:8080
8-
links:
9-
- mysql
10-
- redis
11-
environment:
12-
DB_HOST: mysql
13-
DB_DATABASE: laravel_docker
14-
DB_USERNAME: root
15-
DB_PASSWORD: toor
16-
REDIS_HOST: redis
17-
SESSION_DRIVER: redis
18-
CACHE_DRIVER: redis
19-
networks:
20-
- testservice_bridge2
21-
mysql:
22-
image: mysql:5
2313
volumes:
24-
- ./data:/var/lib/mysql
25-
ports:
26-
- 3306:3306
14+
- .:/var/www/html/
15+
mysql:
16+
container_name: lap-mysql
17+
image: mysql:5.7
2718
restart: always
19+
ports:
20+
- 13306:3306
21+
volumes:
22+
- mysql:/var/lib/mysql
2823
environment:
29-
MYSQL_ROOT_PASSWORD: toor
30-
MYSQL_DATABASE: laravel_docker
31-
networks:
32-
- testservice_bridge2
24+
MYSQL_DATABASE: laravel-admin-panel
25+
MYSQL_ROOT_PASSWORD: root
26+
MYSQL_USER: admin
27+
MYSQL_PASSWORD: admin
3328
redis:
34-
image: redis:4.0-alpine
29+
container_name: lap-redis
30+
image: redis:4-alpine
31+
restart: always
3532
ports:
36-
- 6379:6379
37-
networks:
38-
- testservice_bridge2
33+
- 16379:6379
34+
volumes:
35+
- redis:/data
3936
phpmyadmin:
37+
container_name: lap-phpmyadmin
4038
image: phpmyadmin/phpmyadmin
39+
restart: always
40+
ports:
41+
- 8081:80
42+
links:
43+
- mysql
4144
environment:
42-
PMA_PORT: 3306
4345
PMA_HOST: mysql
44-
PMA_USER: root
45-
PMA_PASSWORD: toor
46-
ports:
47-
- "8005:80"
48-
restart: always
49-
depends_on:
50-
- mysql
51-
networks:
52-
- testservice_bridge2
53-
networks:
54-
testservice_bridge2:
46+
47+
volumes:
48+
mysql:
49+
driver: "local"
50+
redis:
51+
driver: "local"

docker/app/Dockerfile

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM php:7.2-apache-stretch
2+
3+
ENV LARAVEL_VERSION 5.8
4+
ENV INSTALL_DIR /var/www/html
5+
ENV COMPOSER_HOME /var/www/.composer/
6+
7+
# Install common tools and libraries
8+
RUN apt-get update && apt-get install -y \
9+
cron \
10+
git \
11+
gzip \
12+
libfreetype6-dev \
13+
libicu-dev \
14+
libjpeg62-turbo-dev \
15+
libmcrypt-dev \
16+
libpng-dev \
17+
libxslt1-dev \
18+
libmagickwand-dev \
19+
lsof \
20+
mysql-client \
21+
vim \
22+
zip \
23+
unzip \
24+
curl \
25+
openssl \
26+
libssl-dev \
27+
libcurl4-openssl-dev
28+
29+
RUN pecl install imagick-3.4.3
30+
31+
# http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html
32+
RUN docker-php-ext-install bcmath \
33+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
34+
&& docker-php-ext-install gd \
35+
&& docker-php-ext-install intl \
36+
&& docker-php-ext-install mbstring \
37+
&& docker-php-ext-install opcache \
38+
&& docker-php-ext-install pdo_mysql \
39+
&& docker-php-ext-install zip \
40+
&& docker-php-ext-install xml \
41+
&& docker-php-ext-install ctype \
42+
&& docker-php-ext-install json \
43+
&& docker-php-ext-enable imagick \
44+
&& docker-php-ext-install bz2 \
45+
&& docker-php-ext-install exif
46+
47+
# Install Node, Npm
48+
RUN apt-get install -y gnupg \
49+
&& curl -sL https://deb.nodesource.com/setup_11.x | bash - \
50+
&& apt-get install -y nodejs \
51+
&& mkdir /var/www/.config /var/www/.npm
52+
53+
# Install Composer
54+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
55+
56+
# Make sure the volume mount point is empty
57+
RUN rm -rf /var/www/html/*
58+
59+
# Set www-data as owner for /var/www
60+
RUN chown -R www-data:www-data /var/www/
61+
RUN chmod -R g+w /var/www/
62+
63+
# add apache modules and configuration
64+
RUN a2enmod rewrite \
65+
&& a2enmod headers \
66+
&& a2enmod expires \
67+
&& echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini
68+
69+
# Remove unnecssary modules
70+
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
71+
72+
# copy project files
73+
COPY . /var/www/html
74+
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
75+
76+
77+
WORKDIR $INSTALL_DIR

docker/app/vhost.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<VirtualHost *:80>
2+
DocumentRoot /var/www/html/public
3+
4+
<Directory /var/www/html/public>
5+
AllowOverride All
6+
Require all granted
7+
</Directory>
8+
9+
ErrorLog /var/www/html/error.log
10+
CustomLog /var/www/html/access.log combined
11+
</VirtualHost>
12+
13+
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

docker/bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker/cli bash

docker/cli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
3+
docker-compose exec app "$@"

docker/clinotty

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
3+
docker-compose exec -T app "$@"

0 commit comments

Comments
 (0)