Created
May 15, 2019 17:39
-
-
Save bdaley/a9d1b184857a4012be300e46485291c2 to your computer and use it in GitHub Desktop.
Simple Docker Setup for PHP
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: | |
db: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
volumes: | |
- "./database:/docker-entrypoint-initdb.d" | |
ports: | |
- "3307:3306" | |
php: | |
build: ./ | |
command: php -S 0.0.0.0:8000 /app/index.php | |
ports: | |
- "8000:8000" | |
volumes: | |
- .:/app | |
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.5-cli-stretch | |
RUN docker-php-ext-install mysqli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment