-
-
Save kerrongordon/9f1623c3f4f021a6d065d5240e1268b6 to your computer and use it in GitHub Desktop.
Docker setup with Laravel
This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerName localhost | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /var/www/app/public | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| </VirtualHost> |
This file contains hidden or 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
| version: '3' | |
| services: | |
| web: | |
| container_name: ${APP_NAME}_web | |
| build: | |
| context: ./docker/web | |
| ports: | |
| - 9000:80 | |
| volumes: | |
| - ./:/var/www/app | |
| db: | |
| container_name: ${APP_NAME}_db | |
| image: postgres:10.5 | |
| ports: | |
| - 5432:5432 | |
| volumes: | |
| - ./pgdata:/var/lib/postgresql/data | |
| environment: | |
| - POSTGRES_PASSWORD=secret | |
| - POSTGRES_USER=homestead | |
| - POSTGRES_DB=homestead | |
| cache: | |
| container_name: ${APP_NAME}_cache | |
| image: redis:4.0.11 | |
| ports: | |
| - 63790:6379 | |
| search: | |
| container_name: ${APP_NAME}_search | |
| image: elasticsearch:6.4.1 | |
| ports: | |
| - 6200:9200 |
This file contains hidden or 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
| FROM php:7.2.10-apache-stretch | |
| RUN apt-get update -yqq && \ | |
| apt-get install -y apt-utils zip unzip && \ | |
| apt-get install -y nano && \ | |
| apt-get install -y libzip-dev libpq-dev && \ | |
| a2enmod rewrite && \ | |
| docker-php-ext-install pdo_pgsql && \ | |
| docker-php-ext-install pgsql && \ | |
| docker-php-ext-configure zip --with-libzip && \ | |
| docker-php-ext-install zip && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer | |
| COPY default.conf /etc/apache2/sites-enabled/000-default.conf | |
| WORKDIR /var/www/app | |
| CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] | |
| EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment