What are the best methods to work with Docker ?

Discussion in 'Docker and Containers' started by Dlazzy, May 23, 2017.

  1. Dlazzy

    Dlazzy New Member

    Joined:
    May 23, 2017
    Messages:
    3
    Likes Received:
    1
    Hello,

    I already tried to ask this on official Docker forums but I've got no response :/
    Currently I use Bitbucket for versionning, Capistrano to deploy in the Docker container or to the server where Docker is hosted, and nginx-proxy from jwilder to access differents website from everywhere. There are the differents questions :

    Keep in mind, Docker config files and source code will be updated almost everyday.

    Bitbucket :
    - Having two repos for one project (on BitBucket), one for the Docker files (docker-compose, apache configuration...) and one for the source code of the website.
    - Or use one repo (on BitBucket), with a folder named docker at the root that contain the Docker files (docker-compose, apache configuration...), and one other named wwwroot that contain source code.

    Deploy with Capistrano :
    - Run a SSH server inside the apache container of the project, capistrano connect to the apache container (using a key), and do a deploy in it (of course Capistrano manage by himself the release, current, shared folder)
    - Or Capistrano deploy on the server where Docker is hosted not in the container that contain the source code.

    Executing npm, composer, grunt during a deploy with Capistrano :
    On each deploy I need to execute of course npm install, composer install....
    - Create .rake that contain all command need to be executed on each deploy.
    - Or say to Capistrano to execute a .sh script in the release folder on the server that host Docker on each deploy ?

    Managing environnment :

    What's the best way to manage the differents environnments ?
    For example, I clone the entire project I wan't to set to DEV the env. So all Docker containers will be launched with local DEV config. Same for pre production, production, staging...

    Thank you for you answer, maybe you cannot give an advice to all, but some should be very very nice !
     
    #1
  2. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,359
    Likes Received:
    191
    I'd assume the reason you aren't getting many responses on the official docker forum is that you are using a really specific stack and it's been mostly replaced by core components that the majority of Docker people are using.

    The stack that I see just about everyone using these days is:
    • DockerHub + Private registry
    • GitHub or Gitlab or other. Bitbucket isn't an issue. GitHub to docker hub has great integration if you're doing a public project.
    • Docker Compose. docker compose up.
    That's how I'm seeing the stack mostly managed these days doing all of the above. When you're looking for answers, that's the way to go.
     
    #2
    Dlazzy likes this.
  3. Dlazzy

    Dlazzy New Member

    Joined:
    May 23, 2017
    Messages:
    3
    Likes Received:
    1
    Thank you for your reply, I will see for a private registry. Thanks again
     
    #3
    Jeggs101 likes this.
  4. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,359
    Likes Received:
    191
    You can pay Docker to do it or you can host your own except that's more of a pain now.
     
    #4
  5. Dlazzy

    Dlazzy New Member

    Joined:
    May 23, 2017
    Messages:
    3
    Likes Received:
    1
    Everythings work great I'm just searching some "best practice" to have a powerfull solution to all of my projects :)
     
    #5
Similar Threads: best methods
Forum Title Date
Docker and Containers Best way to stop all docker containers on a host Oct 11, 2017

Share This Page