Files
chatwoot/Makefile
Sojan Jose b70d2c0ebe chore: Improvements for codespace (#11667)
- move to vite build instead of dev for codespaces
- disable miniprofiler
2025-06-04 00:21:23 -05:00

63 lines
1.3 KiB
Makefile

# Variables
APP_NAME := chatwoot
RAILS_ENV ?= development
# Targets
setup:
gem install bundler
bundle install
pnpm 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_reset:
RAILS_ENV=$(RAILS_ENV) bundle exec rails db:reset
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 && pnpm install
run:
@if [ -f ./.overmind.sock ]; then \
echo "Overmind is already running. Use 'make force_run' to start a new instance."; \
else \
overmind start -f Procfile.dev; \
fi
force_run:
rm -f ./.overmind.sock
rm -f tmp/pids/*.pid
overmind start -f Procfile.dev
force_run_tunnel:
lsof -ti:3000 | xargs kill -9 2>/dev/null || true
rm -f ./.overmind.sock
rm -f tmp/pids/*.pid
overmind start -f Procfile.tunnel
debug:
overmind connect backend
debug_worker:
overmind connect worker
docker:
docker build -t $(APP_NAME) -f ./docker/Dockerfile .
.PHONY: setup db_create db_migrate db_seed db_reset db console server burn docker run force_run force_run_tunnel debug debug_worker