From f825a229976c6e855c7a64b769d188dcfef85485 Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Mon, 24 Apr 2023 11:32:17 +0530 Subject: [PATCH] feat: add Makefile (#6948) * feat: add Makefile * chore: refactor --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..499d0ab6b --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +# Variables +APP_NAME := chatwoot +RAILS_ENV ?= development + +# Targets +setup: + gem install bundler + bundle install + yarn install + +db_create: + RAILS_ENV=$(RAILS_ENV) bundle exec rails db:create + +db_migrate: + RAILS_ENV=$(RAILS_ENV) bundle exec rails db:migrate + +db_seed: + RAILS_ENV=$(RAILS_ENV) bundle exec rails db:seed + +db: + RAILS_ENV=$(RAILS_ENV) bundle exec rails db:chatwoot_prepare + +console: + RAILS_ENV=$(RAILS_ENV) bundle exec rails console + +server: + RAILS_ENV=$(RAILS_ENV) bundle exec rails server -b 0.0.0.0 -p 3000 + +burn: + bundle && yarn + +run: + overmind start -f Procfile.dev + +docker: + docker build -t $(APP_NAME) -f ./docker/Dockerfile . + +.PHONY: setup db_create db_migrate db_seed db console server burn docker run