Code Monkey home page Code Monkey logo

easy-docker's Introduction

Easy Docker

An easy way to maintain PHP version with some essential config like as virtual Host, Mysql, Redis and more. It's only for localhost :)

Note: This package is forked from rinkurock/easy-docker package; thanks to the author of that package.

Features

  • Virtual Host with nginx
  • PHP FPM
  • PHP version 5.5.34, 5.6, 7.0, 7.1, 7.1.3, 7.2, 7.3.22, 7.4.13, 8.1.0 etc
  • MySql 5.7, 8.0.19
  • Postgres
  • Adminer
  • Redis
  • Mongo
  • Consul
  • RabbitMq
  • Elastic Search
  • Kibana

Getting started

  1. Clone the easy-docker github repository

    git clone https://github.com/sarahman/easy-docker ~/easy-docker
  2. Go to easy-docker directory

    cd ~/easy-docker
  3. Copy .env.example to .env

    cp .env.example .env
  4. Copy docker-compose.yml.example to docker-compose.yml

    cp docker-compose.yml.example docker-compose.yml
  5. Edit APPLICATION=/your-root-project-directory & database setting on .env file

    nano .env
  6. Run docker-compose

    docker-compose up -d
  7. Go to http://localhost:9999 on browser

Setup Virtual Host for project

Run:

sudo ./v-host.sh

and follow the instructions on command line

  • sudo for only adding local domain address on /etc/hosts file on your system.

You can check it by run:

cat /etc/hosts

Run:

docker-compose ps

Accessing Globally

Sometimes you may want to docker-compose up your easy-docker machine from anywhere on your filesystem. You can do this on Unix systems by adding a Bash function to your Bash profile. These scripts will allow you to run any docker-compose command from anywhere on your system and will automatically point that command to your easy-docker installation:

function easydocker() {
    ( cd ~/easy-docker && docker-compose $* )
}

Miscellaneous

Setup ZSH Terminal For Better Terminal

https://ohmyz.sh/ is used for the better terminal experience. This link can be used to install the zsh terminal or can follow the following commands:

easydocker exec php bash
apt-get update && apt-get dist-upgrade -y
apt-get install -y build-essential curl file fonts-powerline git git-core zsh
dpkg-reconfigure dash
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git config --global oh-my-zsh.hide-status 1
git config --global oh-my-zsh.hide-dirty 1
exit
easydocker exec php zsh

Contribution

All issues, PRs and advices are more than welcome to discuss about. :)

License

MIT

easy-docker's People

Contributors

sarahman avatar rinkurock avatar rinku-pathao avatar shohoz-abid avatar mahfuz05 avatar

Watchers

James Cloos 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.