GithubHelp home page GithubHelp logo

stephenhoult / docker-dev-env Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

A php, mysql, node and mailcatcher enabled local dev environment

Dockerfile 97.60% PHP 2.40%
hacktoberfest dev-environment docker mysql nginx php

docker-dev-env's Introduction

docker-dev-env

A php, mysql, node and mailcatcher enabled local dev environment

Usage

Add the following to your hosts file.

127.0.0.1 docker-dev-env.test

From the project root directory run docker-compose up.

Browse to http://docker-dev-env.test:8080/ and you should see It works!.

To ssh into one of the containers, e.g. the php container

run docker ps to get a list of containers.

Find the name of the container you wish to ssh into. E.g. docker-dev-env_php_1 and run docker exec -it docker-dev-env_php_1 bash to connect to the container and run bash.

If using mailcatcher for emails, any sent emails will be viewable at http://docker-dev-env.test:1080

Customisation

If not using docker-dev-env.test as your development domain, update the docker/nginx.conf file with your development domain.

server_name .docker-dev-env.test

Don't forget to update your hosts file with your development domain.

To change the database name, user or password update the applicable values in docker-compose.override.yml with the desired values.

The defaults are as follows:

MYSQL_DATABASE: docker-dev-env-db
MYSQL_PASSWORD: docker-dev-env-db-password
MYSQL_ROOT_PASSWORD: docker-dev-env-db-root-password
MYSQL_USER: docker-dev-env-user

To change the port nginx listens on update docker-compose.yml to reference the new port number.

E.g.

To listen on port 8181 change the below

ports:
      - "8080:80"

to

ports:
      - "8181:80"

Troubleshooting

When changing an environment variable you must rebuild the php container before running docker-compose up.

docker-compose build --no-cache php

docker-dev-env's People

Contributors

stephenhoult avatar stephenhoult-ofs avatar

Watchers

 avatar

docker-dev-env's Issues

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.