Giter Club home page Giter Club logo

docker-php7-mysql-postgres's Introduction

How to use?
===========

First add the project as a submodule:

    git submodule add https://github.com/firegate666/docker-php7-mysql-postgres.git ./docker
    git submodule init
    git submodule update --remote

Afterwards enter the docker folder and enter

    PORT="8976" DOCROOT="web" docker-compose up --build
    
to start the machine. PORT is the exposed port where you can access you application and DOCROOT points to /app/DOCROOT on the machine where /app is mounted to the parent of this docker folder.
    
Now you can access the databases from within your project by talking to 'mysql' or 'postgres' as host.

Try

    docker exec -it web_app_postgres psql -U myapp
    
or

    docker exec -it web_app_mysql mysql --user=myapp --password --host=localhost myapp
    
The internal php server fires up the application and makes it accesible on the docker ip on port "as configured above". 
If unsure you can use docker-machine to get the IP address. 

To enter you machine you can exec

    docker exec -it web_app bash
    
then you are logged in as user. Your machines might have gotten a different name than this. You can always use "docker ps" to get a list of running containers and there name or specify a custom container name by setting "--name SOMETHING" when executing "docker-compose run".

The folder above you docker folder is mounted to /app, the webroot points to /app/web, this should be configurable in the future.

e.g.:

    http://192.168.64.4:8976/
    
TODO
====
- ...

docker-php7-mysql-postgres's People

Contributors

firegate666 avatar n2o avatar

Watchers

 avatar  avatar

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.