GithubHelp home page GithubHelp logo

docker-compose-development-manager's Introduction

This project is ABANDONED.

Our company has moved to DDEV, for that reason this repository is deprecated.


Introduction

This tool allows for loading of environment variables similar to symfony/dotenv, only then for Docker Compose environments. Loading environment variable this way should help with a more consistent development process.

Installation

Checkout the project and add dev to $PATH.

Usage

Ensure docker-compose.yml, .env and .env.dev are available and configured. Then start the environment with dev up.

It's possible to install template environments from this project using dev init, which will install useful files for a quick setup.

Updating Templates

Whenever you update a file for a certain template like magento-2. You should also update the version of the docker-compose.yml. You can find it here:

x-custom:
  version: 1.x.x
  type: magento-2

Whenever you update a template in a project make sure you revert the custom changes.

You know when you have to update the templates when you see the message:

The current docker template is outdated, 
please run "dev init TEMPLATE_NAME -f" to update it.

docker-compose-development-manager's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-compose-development-manager's Issues

Invalid `if-else` statement in `.env.dev` file

Within the .env.dev file I get by default, there is in the bottom the following statement:

if [[ "${CONFIG__DEFAULT__SYSTEM__FULL_PAGE_CACHE__CACHING_APPLICATION}" == "2" ]]; then
    PROXY_HOST="${VARNISH_HOST}"
    PROXY_PORT="${VARNISH_PORT}"
else
    PROXY_HOST="${NGINX_PHP_FPM_HOST}"
    PROXY_PORT="${NGINX_PHP_FPM_PORT}"
fi

When entering the console container with dev console this causes a weird error for me:

unexpected character "[" in variable name near "if [[ \"${CONFIG__DEFAULT__SYSTEM__FULL_PAGE_CACHE__CACHING_APPLICATION}\" == \"2\" ]]; then\n    PROXY_HOST=\"${VARNISH_HOST}\"\n    PROXY_PORT=\"${VARNISH_PORT}\"\nelse\n    PROXY_HOST=\"${NGINX_PHP_FPM_HOST}\"\n    PROXY_PORT=\"${NGINX_PHP_FPM_PORT}\"\nfi\n"

Even though the .env.dev is fine to include in a regular bash script, it fails when using it with docker-compose. The documentation perhaps gives some clues: https://docs.docker.com/compose/env-file/ It states that the lines in the env file are only supposed to contain FOO=bar assignments, comments, but nothing else. No shell scripting. I only got it working by hard-coding the port into things instead (like the following in case Varnish is not used):

PROXY_HOST=nginx-php-fpm
PROXY_PORT=80

Service `db` requires `platform: linux/x86_64` under MacOS

While playing with this Docker setup, @WOH2021 found out that he couldn't get the db service, unless the line platform: linux/x86_64 was added to his docker-compose.yml file. He's running MacOS. The end-result would look like so:

  db:
    platform: linux/x86_64
    image: percona:8
    ...

Would this be something to be added to the docker-compose.yml file directly? Or perhaps in the docs here?

For reference: https://stackoverflow.com/questions/65456814/docker-apple-silicon-m1-preview-mysql-no-matching-manifest-for-linux-arm64-v8

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.