Sha256: 236c3840dff4fd509c6c2241c19f39559504ebc4fb53d3c76a79d7831b6fc94e

Contents?: true

Size: 1.6 KB

Versions: 1

Compression:

Stored size: 1.6 KB

Contents

# Do not edit this file below this point. Any changes will be overwritten.
#
# Example `test` command which will start and wait for all services before
# running tests:
#
# test: start wait
# 	bundle exec rspec
# 	yarn test app/javascript
# 	bundle exec rubocop
# 	yarn run eslint app/javascript
#
.PHONY: docker docker-build docker-push wait-database start

### Container management commands ###

start:
	docker-compose up -d

stop:
	docker-compose down

### Database utility commands ###

migrate: wait-database
	@echo "Running migrations..."
	@docker-compose run application bundle exec rake db:migrate
	@echo "Migrations complete."

### Service healthcheck commands ###

wait: <%= wait_commands %>
	@echo "All Containers ready."

wait-database:
	@bin/rake orchestration:db:wait

wait-mongo:
	@bin/rake orchestration:mongo:wait

wait-rabbitmq:
	@bin/rake orchestration:rabbitmq:wait

### Docker build commands ###

docker: docker-build docker-push

docker-build:
	mkdir -p ./docker/.build
	git show master:./Gemfile > ./docker/Gemfile
	git show master:./Gemfile.lock > ./docker/Gemfile.lock
	git archive --format tar.gz -o docker/.build/context.tar.gz master
	docker build --build-arg BUNDLE_GITHUB__COM \
	             --build-arg BUNDLE_BITBUCKET__ORG \
		     -t $(shell bin/rake orchestration:docker:username)/<%= app_id %> \
		     -t $(shell bin/rake orchestration:docker:username)/<%= app_id %>:$(shell git rev-parse --short --verify master) \
		     ./docker/

docker-push: VERSION := $(shell git rev-parse --short --verify master)
docker-push:
	docker push $(shell bin/rake orchestration:docker:username)/<%= app_id %>:${VERSION}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orchestration-0.2.2 lib/orchestration/templates/Makefile.tt