Last active
August 15, 2020 00:35
-
-
Save otnansirk/4f54d1c54fe67b377879e4297ca68a12 to your computer and use it in GitHub Desktop.
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
======================================================= | |
Dockerfile | |
======================================================= | |
FROM php:7.3-apache | |
RUN docker-php-ext-install mysqli | |
======================================================= | |
docker-compose.yml | |
======================================================= | |
version: "3.1" | |
services: | |
www: | |
build: . | |
ports: | |
- "8001:80" | |
volumes: | |
- ./www:/var/www/html/ | |
links: | |
- db | |
networks: | |
- default | |
db: | |
image: mysql:8.0 | |
ports: | |
- "3306:3306" | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_DATABASE: myDb | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
volumes: | |
- ./dump:/docker-entrypoint-initdb.d | |
- ./conf:/etc/mysql/conf.d | |
- persistent:/var/lib/mysql | |
networks: | |
- default | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
links: | |
- db:db | |
ports: | |
- 8000:80 | |
environment: | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
volumes: | |
persistent: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment