Skip to content

Instantly share code, notes, and snippets.

@jasonmccallister
Last active April 14, 2019 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonmccallister/12c18b9eecd866a30ec5cdbca2c82d3f to your computer and use it in GitHub Desktop.
Save jasonmccallister/12c18b9eecd866a30ec5cdbca2c82d3f to your computer and use it in GitHub Desktop.
.DEFAULT: local
IMAGE ?= your-docker-image
TAG ?= staging
REGISTRY ?= your-registry-info
build:
docker build . -t $(IMAGE):$(TAG)
down:
docker-compose down
local:
docker-compose exec app ./craft install/craft \
--interactive \
--username=developer \
--password=Password1! \
--email=developer@mycompany.com \
--site-name="My Company" \
--site-url="http://local.mycompany.com:8080" \
--language=en-US
push:
docker push "$(REGISTRY)/$(IMAGE):$(TAG)"
restart: down up
stop:
docker-compose stop
tag:
docker tag "$(IMAGE):$(TAG)" "$(REGISTRY)/$(IMAGE):$(TAG)"
up:
docker-compose up -d
xdebug:
docker-compose exec app /usr/local/bin/docker-php-source extract
docker-compose exec app pecl install xdebug
docker-compose exec app /usr/local/bin/docker-php-ext-enable xdebug
docker-compose exec app /usr/local/bin/docker-php-source delete
docker-compose stop
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment