mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 22:56:21 +00:00
feat: servidor de desarrollo
This commit is contained in:
parent
a46bb26491
commit
4e74204931
2 changed files with 17 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -8,15 +8,9 @@ hain ?= ENV_FILE=.env $(HAINISH)## Ubicación de Hainish
|
|||
test: always ## Ejecutar los tests
|
||||
$(MAKE) rake args="test RAILS_ENV=test $(args)"
|
||||
|
||||
postgresql: ## Iniciar la base de datos
|
||||
pgrep postgres >/dev/null || $(hain) postgresql
|
||||
|
||||
serve-js: ## Iniciar el servidor de desarrollo de Javascript
|
||||
$(hain) 'bundle exec ./bin/webpack-dev-server'
|
||||
|
||||
serve: postgresql Gemfile.lock ## Iniciar el servidor de desarrollo de Rails
|
||||
$(MAKE) rails args=server
|
||||
|
||||
rails: ## Corre rails dentro del entorno de desarrollo (pasar argumentos con args=).
|
||||
$(MAKE) bundle args="exec rails $(args)"
|
||||
|
||||
|
|
|
@ -97,3 +97,20 @@ tasks:
|
|||
status:
|
||||
- "test -f ../hain{{.PGPID}}"
|
||||
- "pgrep -F ../hain{{.PGPID}}"
|
||||
prepare:
|
||||
desc: "Create database or run pending migrations"
|
||||
deps:
|
||||
- "database"
|
||||
cmds:
|
||||
- "{{.HAINISH}} bundle exec rails db:prepare"
|
||||
serve:
|
||||
desc: "Run Rails development server"
|
||||
deps:
|
||||
- "prepare"
|
||||
- "gems"
|
||||
cmds:
|
||||
- ": == Development server running at https://panel.{{.SUTTY_WITH_PORT}} =="
|
||||
- "{{.HAINISH}} bundle exec rails server"
|
||||
status:
|
||||
- "test -f tmp/pids/server.pid"
|
||||
- "pgrep -F tmp/pids/server.pid"
|
||||
|
|
Loading…
Reference in a new issue