Unverified Commit 73a58d0c authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #220 from indranshastri/develop

changes for docker commit
parents ce9c36be dd610407
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get install -qy language-pack-en-base \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get -y install apache2
RUN a2enmod headers
RUN a2enmod rewrite
# add PPA for PHP 7
RUN apt-get install -y --no-install-recommends apt-utils
RUN apt update
RUN apt -y dist-upgrade
RUN apt remove --purge ca-certificates
RUN apt autoremove
RUN apt install ca-certificates
RUN apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository -y ppa:ondrej/php
# Adding php 7
RUN apt-get update
RUN apt-get install -y php7.1 php7.1-fpm php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip
RUN apt-get -y install libapache2-mod-php7.1 php7.1 php7.1-cli php-xdebug php7.1-mbstring sqlite3 php7.1-mysql php-imagick php-memcached php-pear curl imagemagick php7.1-dev php7.1-phpdbg php7.1-gd npm nodejs-legacy php7.1-json php7.1-curl php7.1-sqlite3 php7.1-intl apache2 vim git-core wget libsasl2-dev libssl-dev
RUN apt-get -y install libsslcommon2-dev libcurl4-openssl-dev autoconf g++ make openssl libssl-dev libcurl4-openssl-dev pkg-config libsasl2-dev libpcre3-dev
RUN apt-get install -y imagemagick graphicsmagick
RUN a2enmod headers
RUN a2enmod rewrite
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
# Update application repository list and install the Redis server.
#RUN apt-get update && apt-get install -y redis-server
# Allow Composer to be run as root
ENV COMPOSER_ALLOW_SUPERUSER 1
# Setup the Composer installer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php \
&& chmod a+x composer.phar \
&& mv composer.phar /usr/local/bin/composer
# Install composer dependencies
RUN echo pwd: `pwd` && echo ls: `ls`
# RUN composer install
EXPOSE 80
# Expose default port
#EXPOSE 6379
VOLUME [ "/var/www/html" ,"/etc/mysql"]
WORKDIR /var/www/html
ENTRYPOINT [ "/usr/sbin/apache2" ]
CMD ["-D", "FOREGROUND"]
COPY . /var/www/html
COPY ./deploy/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN chown -R www-data:www-data /var/www/html \
&& a2enmod rewrite
RUN chown -R 777 /var/www/html/
RUN composer install
RUN php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
<VirtualHost *:80>
DocumentRoot /var/www/html/public
<Directory "/var/www/html/public">
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
\ No newline at end of file
version: '3'
services:
app:
image: inshastri/laravel-adminpanel:latest
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
restart: always
environment:
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: laravel_docker
networks:
- testservice_bridge2
redis:
image: redis:4.0-alpine
ports:
- 6379:6379
networks:
- testservice_bridge2
phpmyadmin:
image: phpmyadmin/phpmyadmin
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:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment