Skip to content

Instantly share code, notes, and snippets.

@siu-issiki
Last active March 10, 2020 14:29
Show Gist options
  • Save siu-issiki/d69e9777c6f35df73e52f312def02907 to your computer and use it in GitHub Desktop.
Save siu-issiki/d69e9777c6f35df73e52f312def02907 to your computer and use it in GitHub Desktop.
COMPOSE = docker-compose -f docker/docker-compose.yml -p example
MAIN_CONTAINER = node
build: service_build db_init migration
service_build:
$(COMPOSE) build
db_init:
$(COMPOSE) run db docker-entrypoint.sh
migration:
$(COMPOSE) run -e NODE_ENV=development $(MAIN_CONTAINER) yarn migration:run
$(COMPOSE) run -e NODE_ENV=test $(MAIN_CONTAINER) yarn migration:run
up:
$(COMPOSE) up ${ARG}
clean:
$(COMPOSE) down -v --rmi all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment