Skip to content

Instantly share code, notes, and snippets.

@shahinism
Created January 30, 2020 13:48
Show Gist options
  • Save shahinism/fac7dd2d9701d7fb26c3c464c2a4a104 to your computer and use it in GitHub Desktop.
Save shahinism/fac7dd2d9701d7fb26c3c464c2a4a104 to your computer and use it in GitHub Desktop.
PHP development on docker
# This compose is aimed to be self contained to run PHP applications
# I was using it to contribute on development of a WordPress website
version: '3'
services:
web:
restart: always
image: nginx:latest
volumes:
- ./:/content:z
- ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:z
links:
- php
- mariadb
ports:
- "8000:80"
php:
build: ./docker/php/
restart: always
volumes:
- ./:/content:z
mariadb:
image: mariadb:10.0.20
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_NAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
- ./database:/var/lib/mysql:z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment