Skip to content

Commit

Permalink
start all machines at up
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwimmer committed Jan 12, 2025
1 parent eebc785 commit 00140a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions wodoo/consts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
from pathlib import Path
from .tools import _search_path

DOCKER_PROFILES = ['manual', 'auto']
VERSIONS = [7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0]
YAML_VERSION = '3.7'
DEFAULT_IMAGES_REPO = "https://github.com/marcwimmer/wodoo-images"
IMAGES_REPO_BRANCH = "2025-01"

def resolve_profiles(profile):
if profile == "all":
return DOCKER_PROFILES
return profile.split(",")

default_dirs = {
'admin': 'admin',
'odoo_home': '',
Expand Down
10 changes: 5 additions & 5 deletions wodoo/lib_control_with_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ def recreate(ctx, config, machines=[]):
__dc(config, ["up", "--no-start", "--force-recreate"] + machines)


def up(ctx, config, machines=[], daemon=False, remove_orphans=True, profile="auto"):
def up(ctx, config, machines=[], daemon=False, remove_orphans=True, profile="all"):
machines = list(machines)
from .consts import resolve_profiles

options = [
# '--remove-orphans', # lost data with that; postgres volume suddenly new after rm?
Expand All @@ -187,12 +188,11 @@ def up(ctx, config, machines=[], daemon=False, remove_orphans=True, profile="aut
if remove_orphans:
options += ["--remove-orphans"]
dc_options = []
if profile:
dc_options += ["--profile", profile]

if not machines and config.run_postgres and daemon and config.USE_DOCKER:
_start_postgres_before(config)
__dc(config, dc_options + ["up"] + options + machines)
for profile in resolve_profiles(profile):
dc_options2 = dc_options + ["--profile", profile]
__dc(config, dc_options2 + ["up"] + options + machines)


def down(ctx, config, machines=[], volumes=False, remove_orphans=True):
Expand Down

0 comments on commit 00140a5

Please sign in to comment.