Coder Social home page Coder Social logo

docker's Introduction

Docker files

An easy and ready Docker files ready to use in your projects

How to use with docker-compose

  1. Add this repository as git submodule:

    git submodule add https://www.github.com/terox/docker docker

    Note: don't forget add docker/ to your .gitignore

  2. Create a docker-compose.yml in your project root and add the services that you want use, for example the PHP 7.4:

    version: '2'
    
    services:
    
        nginx1:
            container_name: 'myproject.nginx1'
    
            build: 
                context: docker/service/nginx1.18.x
    
                args:
                    php_container: 'myproject.php'
                    preset: 'symfony4.conf'
                    domains: www1.example.com
                    public_path: public
    
        nginx2:
            container_name: 'myproject.nginx2'
    
            build: 
                context: docker/service/nginx1.18.x
    
                args:
                    php_container: 'myproject.php'
                    preset: 'symfony4.conf'
                    domains: www2.example.com
                    public_path: apps/api/public
    
            ports:
                - 8089:80
    
            links:
                - php
    
            volumes_from:
                - php    
    
        php:
            container_name: 'myproject.php'
    
            build: 
                context: docker/service/php7.4-fpm
    
                args:
                    timezone: 'Europe/Madrid' # or you preferred timezone
    
            volumes:
                - .:/var/www/application 
  3. Ready to play:

    docker-compose up

FAQ

How to update to the latest commit?

Easy. You only need the get the latest commit from master branch:

cd docker && git pull

Note: keep in mind that you must use the directory where you stored the submodule

docker's People

Contributors

terox avatar

Stargazers

 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.