Code Monkey home page Code Monkey logo

docker-nginx-php7's Introduction

This repo is based on https://github.com/mikechernev/dockerised-php and http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm blogpost.

It is repo containing config for docker containers with nginx, php7 and mysql, and also nginx conf for specifically Symfony application.

How to start

if (isset($_SERVER['HTTP_CLIENT_IP'])
  || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
  || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
) {
  header('HTTP/1.0 403 Forbidden');
  exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
  • add docker.local to your local /etc/hosts file (you can change it in site.conf in line containing server_name docker.local;)
  • run docker-compose up in symfony-docker/symfony dir
  • you're set up!

Shortcut

If you're lazy (as I am) you can use setup.sh script that does almost everything for you: creates directories, clones this repository and install newest symfony. Download setup.sh file and execute it: sh setup.sh in directory you want to work. You only have to comment lines listed in 4th point of standard installation instruction and add docker.local host to your /etc/hosts file.

If something not works - let me know, I'll be happy to help!

This is a part of my series about creating Symfony app using docker. If you want to learn more visit: http://jonczyk.me/2016/08/02/phpyths-buster-project-environment/ post.

docker-nginx-php7's People

Stargazers

Roman avatar

Watchers

James Cloos avatar Marcin R. avatar

Forkers

lucasaba

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.