Created
December 19, 2018 11:45
-
-
Save c3ry5/725bf3ec96ac312ff3e52770080f902a to your computer and use it in GitHub Desktop.
Basic Docker Setup for php & MySql with the dependancies for Xenforo
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.3' | |
services: | |
db: | |
image: 'mysql:5.7' | |
volumes: | |
- 'db_data:/var/lib/mysql' | |
restart: always | |
environment: | |
MYSQL_DATABASE: myDb | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
ports: | |
- "3306:3306" | |
www: | |
depends_on: | |
- db | |
build: . | |
ports: | |
- '8001:80' | |
volumes: | |
- './php:/var/www/html/' | |
restart: always | |
environment: | |
MYSQL_DATABASE: myDb | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
volumes: | |
db_data: {} |
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.1.2-apache | |
RUN apt-get update && \ | |
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev && \ | |
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ | |
docker-php-ext-install gd | |
RUN docker-php-ext-install mysqli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment