Last active
March 18, 2019 15:50
-
-
Save marcusandre/9c1c95af2dceab9a18fa2ff0e2ce1e3f to your computer and use it in GitHub Desktop.
run your Lumen development efforts with docker.
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: | |
db: | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: seat | |
MYSQL_USER: seat | |
MYSQL_PASSWORD: seat2019 | |
ports: | |
- 3306:3306 | |
volumes: | |
- db_data:/var/lib/mysql | |
adminer: | |
image: adminer | |
ports: | |
- 8081:8080 | |
php: | |
build: . | |
ports: | |
- '8080:80' | |
volumes: | |
- ./seat:/var/www/html | |
volumes: | |
db_data: |
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.3-apache | |
ENV APACHE_DOCUMENT_ROOT /var/www/html/public | |
RUN docker-php-ext-install pdo pdo_mysql | |
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | |
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
RUN a2enmod rewrite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just to get you started:
Then open http://localhost:8080/ inside your browser.