Skip to content

Instantly share code, notes, and snippets.

@c3ry5
Created December 19, 2018 11:45
Show Gist options
  • Save c3ry5/725bf3ec96ac312ff3e52770080f902a to your computer and use it in GitHub Desktop.
Save c3ry5/725bf3ec96ac312ff3e52770080f902a to your computer and use it in GitHub Desktop.
Basic Docker Setup for php & MySql with the dependancies for Xenforo
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: {}
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