Created
July 4, 2019 13:13
Star
You must be signed in to star a gist
20190704: Apache2.4 + HTTPS(443) + mod_rewrite + PHP7.3 + MySQL5.5 + phpMyAdmin
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: ./Dockerfile | |
hostname: docker.local | |
volumes: | |
- .:/var/www/html | |
ports: | |
- 80:80 | |
- 443:443 | |
links: | |
- mysql | |
depends_on: | |
- mysql | |
mysql: | |
image: mysql:5.5 | |
ports: | |
- 3306:3306 | |
volumes: | |
- ./mysql/mysql_init:/docker-entrypoint-initdb.d | |
- ./mysql/mysql_data:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: mysqluser | |
MYSQL_PASSWORD: mysqlpassword | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
environment: | |
- PMA_ARBITRARY=1 | |
- PMA_HOST=mysql | |
- PMA_USER=root | |
- PMA_PASSWORD=root | |
links: | |
- mysql | |
ports: | |
- 8080:80 | |
volumes: | |
- ./phpmyadmin/sessions:/sessions |
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
FROM php:7.3-apache | |
RUN docker-php-ext-install pdo_mysql | |
RUN apt-get update && apt-get install -y \ | |
libssl-dev \ | |
openssl \ | |
ssl-cert \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& a2enmod ssl \ | |
&& a2enmod rewrite \ | |
&& a2ensite default-ssl | |
# mkcert -install | |
# mkcert docker.local | |
COPY docker.local-key.pem /etc/ssl/private/ssl-cert-snakeoil.key | |
COPY docker.local.pem /etc/ssl/certs/ssl-cert-snakeoil.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment