Giter VIP home page Giter VIP logo

webenv's Introduction

webenv

Dockerized LAMP stack local development environment with https & wildcard subdomains. Uses webenv-httpd and webenv-php. Built for and tested on macOS.

Getting started

$ git clone [email protected]:andreiio/webenv.git
$ cd webenv
$ cp .env.example .env
$ sudo ./resolver.sh
$ docker-compose up -d

That easy! Well, maybe you should edit the .env file before.

Directory structure

├── docker-compose.yml
├── mnt
│   ├── httpd
│   │   ├── config
│   │   │   ├── httpd.conf
│   │   │   ├── sites
│   │   │   │   └── default.conf
│   │   │   └── ssl
│   │   │       ├── example.domain.crt
│   │   │       └── example.domain.key
│   │   └── www
│   │       ├── sub1.example.domain (user-created dir or symlink)
│   │       ├── sub2.example.domain (user-created dir or symlink)
│   │       └── example.domain (pre-populated)
│   └── mariadb
│       └── ...
└── resolver.sh

Wildcard SSL certificate

This is generated on runtime, assuming there's no matching certificate already present. It can be replaced with any other crt/key pair or added to your trusted

1:1 directory mapping

If you don't want to maintain multiple copies of your code (and who does, really?), you can map your projects folder to the containers. Assuming you're keeping all your work in ~/Projects, add the following volumes to your docker-compose.yml. Make sure you change it for both apache and php, otherwise you might run into issues later on.

version: '3'
services:
    httpd:
        ...
        volumes:
            ...
            - $HOME/Projects:$HOME/Projects
    php:
        ...
        volumes:
            ...
            - $HOME/Projects:$HOME/Projects
    ...

This allows you to symlink projects to their respective /www path directly from the host, without having to bash your way into the containers every time you want to make a change. This also works wonders for projects that don't server their content from their root.

webenv's People

Contributors

andreiio avatar

Watchers

 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.