GithubHelp home page GithubHelp logo

geowrgetudor / basicdocker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 13 KB

Basic docker-compose file for web developers

License: MIT License

Shell 26.49% Dockerfile 73.51%
docker docker-compose php php-environment php-docker php-docker-image php-container

basicdocker's Introduction

Basic Docker DEV environment for Web Developers

Lighweight and simple. Do NOT use this in production.

Upgrade

Note: If you were running this before and want to upgrade from PHP 7.3 to PHP 7.4 you will just need to remove the php-fpm container and rebuild it.

docker-compose stop
docker-compose rm <php_fpm_container_id>
docker-compose build --no-cache
docker-compose up -d --force-recreate

Packages

  • PHP 7.4
  • MySql 8.0
  • Nginx
  • phpMyAdmin
  • Redis
  • Composer
  • Mailhog

Installation

Clone or download this repository in your project's root folder

git clone [email protected]:zippos/basicdocker.git

Usage

Copy .env.example to .env. By default the HOST_ROOT is set to the parent folder but you can set it up however you want.

Copy svqdocker/nginx/nginx.example to svqdocker/nginx/nginx.conf By default, the nginx confg loads your application from the root directory. If you want to change that, edit the .conf file.

Run

docker-compose up -d

Example for Laravel:

# default root path
root /application;

# laravel root path
root /application/public;

You can easily stop, remove and rebuild all containers with just one command.

./docker-rebuild.sh

WARNING! By using docker-rebuild.sh you will lose all your databases.

Exposed ports

localhost:8000 # webserver default
localhost:8081 # mailhog default
localhost:8080 # phpmyadmin default

Hostnames

mysql # for mysql
redis # for redis
php-fpm # for php-fpm (port 9000)
mailhog # for mail

MySql default user & password

root:root

Upload size limit

256M # phpmyadmin
100M # webserver

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

basicdocker's People

Contributors

geowrgetudor avatar zippos avatar

Stargazers

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