Skip to content

Commit

Permalink
Rename compose files to new canonical format
Browse files Browse the repository at this point in the history
  • Loading branch information
omarlopesino committed Mar 25, 2024
1 parent 911f272 commit e441a03
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ behat:
## ngrok : Setup a ngrok tunnel to make the site available
.PHONY: ngrok
ngrok:
$(DOCKER_COMPOSE_CMD) -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.ngrok.yml up -d && $(DOCKER_COMPOSE_CMD) exec php curl http://ngrok:4040/api/tunnels | grep -Po "https"://[^\"]+
$(DOCKER_COMPOSE_CMD) -f compose.yml -f compose.override.yml -f compose.ngrok.yml up -d && $(DOCKER_COMPOSE_CMD) exec php curl http://ngrok:4040/api/tunnels | grep -Po "https"://[^\"]+

## ngrok-stop : Stop the created ngrok tunnel
.PHONY: ngrok-stop
ngrok-stop:
$(DOCKER_COMPOSE_CMD) -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.ngrok.yml stop ngrok && $(DOCKER_COMPOSE_CMD) -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.ngrok.yml rm -fsv ngrok
$(DOCKER_COMPOSE_CMD) -f compose.yml -f compose.override.yml -f compose.ngrok.yml stop ngrok && $(DOCKER_COMPOSE_CMD) -f compose.yml -f compose.override.yml -f compose.ngrok.yml rm -fsv ngrok

## frontend : Generate frontend assets like compiling scss
.PHONY: frontend
Expand Down Expand Up @@ -66,7 +66,7 @@ backstopjs-test:
setup-init:
mkdir -p web/sites/default/files/behat/errors
chmod u+w web/sites/${SITE} -R
cp docker-compose.override.yml.dist docker-compose.override.yml
cp compose.override.yml.dist compose.override.yml
cp web/sites/${SITE}/example.settings.local.php web/sites/${SITE}/settings.local.php
cp web/sites/${SITE}/example.local.drush.yml web/sites/${SITE}/local.drush.yml
$(DOCKER_COMPOSE_CMD) up -d
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ logs:
.PHONY: xdebug
xdebug:
@echo "Enabling xdebug in $(PROJECT_NAME)."
@echo "¡¡CAUTION!! X-debug will only work if you have correctly configured docker-compose.xdebug.override.yml file."
@echo "¡¡CAUTION!! X-debug will only work if you have correctly configured compose.xdebug.override.yml file."
$(DOCKER_COMPOSE_CMD) stop php
$(DOCKER_COMPOSE_CMD) pull php
$(DOCKER_COMPOSE_CMD) -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.xdebug.override.yml up -d php
$(DOCKER_COMPOSE_CMD) -f compose.yml -f compose.override.yml -f compose.xdebug.override.yml up -d php

## xdebug-disable : Disable xdebug.
.PHONY: xdebug-stop
xdebug-stop:
@echo "Disabling xdebug in $(PROJECT_NAME)."
$(DOCKER_COMPOSE_CMD) stop php
$(DOCKER_COMPOSE_CMD) -f docker-compose.yml -f docker-compose.override.yml up -d php
$(DOCKER_COMPOSE_CMD) -f compose.yml -f compose.override.yml up -d php

# https://stackoverflow.com/a/6273809/1826109
%:
Expand Down
4 changes: 2 additions & 2 deletions scripts/parse_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Informer(object):


def __init__(self):
source_file = "docker-compose.override.yml"
source_file = "compose.override.yml"
self.parse_env()
self.parse_docker_info()

Expand All @@ -36,7 +36,7 @@ def get_env_value(self, key):


def parse_docker_info(self):
docker_info_stream = subprocess.check_output(['docker-compose', 'config'])
docker_info_stream = subprocess.check_output(['docker compose', 'config'])
# print(docker_info_stream )
self.info = yaml.safe_load(docker_info_stream)

Expand Down

0 comments on commit e441a03

Please sign in to comment.