Skip to content

Instantly share code, notes, and snippets.

@janithl
Last active February 3, 2019 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janithl/fff5dbbed843b46867888092f8738341 to your computer and use it in GitHub Desktop.
Save janithl/fff5dbbed843b46867888092f8738341 to your computer and use it in GitHub Desktop.
version: "2"
services:
webserver:
image: nginx:alpine
ports:
- "8000:80"
volumes:
- .:/var/www
- ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf
networks:
- internal
- default
db:
image: mysql:5.7
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: kottu
MYSQL_ROOT_PASSWORD: your_mysql_root_password
volumes:
- ./docker/dbdata:/var/lib/mysql/
- ./docker/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- internal
php:
image: php:5.6-fpm
build:
context: .
dockerfile: ./docker/php/Dockerfile
volumes:
- .:/var/www
networks:
- internal
networks:
internal:
driver: bridge
default:
driver: host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment