Code Monkey home page Code Monkey logo

Comments (7)

keithy avatar keithy commented on May 21, 2024 2

I added an example of a workaround which shows how to disable a service.

version: '2.1'
services: 
  pgsql: #example that disables a service
    image: alpine
    entrypoint: []

from devilbox.

cytopia avatar cytopia commented on May 21, 2024

Something I am still trying to find a solution for.
The docker-compose.yml file does not have conditions and i still don't know a good way for how to get this working. This would obviously the ultimate goal ;-)

from devilbox.

cytopia avatar cytopia commented on May 21, 2024

@GiorgosK

Selectively loading docker containers is not possible due to the limitations of docker-compose.
I have however separated the container loading into two types:

  1. Base stack (httpd, php, mysql and postgresql)
  2. Optional stack (all of the above and redis (others coming soon).

This will be enabled by PR #44

from devilbox.

cytopia avatar cytopia commented on May 21, 2024

@GiorgosK @jpuck

I finally found a way to make it optional.

Instead of having to define multiple docker-compose.xxx.yml files, there will be only one docker-compose.yml and you can choose during startup via the following examples:

# Load all
$ docker-compose up

# Load only httpd and php
$ docker-compose up httpd php

# Load httpd, php, mysql and redis
$ docker-compose up httpd php mysql redis

However, for this to work, there is going to be some rewrite necessary. Hope I can get this merged soon.

Edit: Going to adjust the title for better searchability

from devilbox.

cytopia avatar cytopia commented on May 21, 2024

@GiorgosK Now fixed in new release

from devilbox.

cytopia avatar cytopia commented on May 21, 2024

@keithy there's no need to comment out a specific service as you can simply specify in the startup-command which of the services you want to spin up.

docker-compose up httpd php bind mysql

See here for more information: https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container

from devilbox.

keithy avatar keithy commented on May 21, 2024

Understood, just offering an alternative.

from devilbox.

Related Issues (20)

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.