Coder Social home page Coder Social logo

ducbin / docker-tutorial-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fathershawn/docker-tutorial-2

0.0 1.0 0.0 3 KB

Companion repository for "How to use Docker for local web development: an update"

Home Page: http://tech.osteel.me/posts/2017/01/15/how-to-use-docker-for-local-web-development-an-update.html

License: MIT License

PHP 100.00%

docker-tutorial-2's Introduction

Docker tutorial

This is the companion repository for How to use Docker for local web development: an update. Please refer to it for a full explanation.

It contains a basic LEMP stack running with Docker, intented to be used for local web development.

Get started

Install Docker on your machine using one of these three ways:

Clone the project:

$ git clone [email protected]:osteel/docker-tutorial-2.git

From the project root:

$ docker-compose up -d

Access localhost from your browser.

Description

The different services, volumes and networks are described in docker-compose.yml:

  • a service for Nginx
  • a service for PHP-FPM
  • a service for MySQL
  • a service for phpMyAdmin
  • a volume to make MySQL data persistent
  • a network for database access
  • a network for HTTP requests

All of the services are using official images.

When building and starting containers for the first time with Docker Compose, a database named project will be created by default. You can change this in the .env file.

A default Nginx configuration is also copied over.

The www/html/ directory is mounted into the one served by Nginx on the container, so any update to the code is available without having to rebuild the container.

The MySQL data sits in its own directory attached to its own named volume to make it persistent.

The application is available on the port 80 of the host machine.

phpMyAdmin is available on port 8080.

Again, for the complete tutorial please head to the original post.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.