Giter Club home page Giter Club logo

docker-emp's Introduction

Docker EMP

A simple Nginx, PHP-FPM, Mysql docker stack

Status - WIP PR's welcome MIT license

Prerequisites

To get started with this docker stack, you will need a few things.

Dockerized

Make sure you are running the Dockerized container. This will route the traffic for all your docker services.

Local HTTPS with mkcert

Make sure you have mkcert (https://mkcert.dev/) installed, and generate the local CA by running mkcert -install.

Automatic local domain resolving

Makes ure dnsmasq is installed. This tool will help us redirect all docker traffic to our localhost.

Installing dnsmasq

For MacOS (with homebrew): brew install dnsmasq

For Ubuntu 18.04:

  • Disable default resolver
sudo systemctl disable systemd-resolved && \
sudo systemctl stop systemd-resolved;
  • Backup and Remove default resolver config
sudo cp /etc/resolv.conf ~/resolv.conf.bck && rm /etc/resolv.conf
  • Create a new resolver config
echo "nameserver 8.8.8.8" > /etc/resolv.conf
  • Install dnsmasq extension
sudo apt update && sudo apt install dnsmasq

Configure to redirect docker.localhost domains

For mac:

  • Create a resolver directory
sudo mkdir -p /etc/resolver
  • Write to a new configuration file
sudo tee /etc/resolver/docker.localhost > /dev/null <<EOF
nameserver 127.0.0.1
domain docker.localhost
search_order 1
EOF

For Ubuntu 18.04:

Coming soon

Getting started

Clone this repo

To use the docker stack, clone this repo into a new folder in the root of your project.

mkdir docker && \
git clone https://github.com/Skullsneeze/docker-EMP.git docker

.env file

Some important information should be made available with the use of an environment file (.env). You can simply copy the existing sample file and modify the variables to match your project.

cp .env.sample .env

Pre-compose

The pre-compose.sh script is a little tool that will help to set up things like certificates and folder permissions where needed. To use the script, first make sure it is executable.

chmod +x ./pre-compose.sh

To see what you can do with the script, you can run the command with the help parameter.

./pre-compose.sh --help

Running the services

To run the services, simply run docker-compose up -d. Once this is done, you should be able to visit your project by browsing to the URL you specified in you .env file.

Additional Notes

The current configuration is based on a Magento 2 installation. Things like the php configuration and nginx configuration might need to be adapted to fit your needs.

ForTheBadge built-with-love

docker-emp's People

Contributors

skullsneeze avatar

Watchers

 avatar  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.