mise à jour de doc pour se passer d'overmind
This commit is contained in:
parent
8f99a0eda3
commit
60c3047e4f
2 changed files with 14 additions and 9 deletions
16
README.md
16
README.md
|
@ -22,9 +22,6 @@ Vous souhaitez y apporter des changements ou des améliorations ? Lisez notre [
|
||||||
|
|
||||||
- rbenv : voir https://github.com/rbenv/rbenv-installer#rbenv-installer--doctor-scripts
|
- rbenv : voir https://github.com/rbenv/rbenv-installer#rbenv-installer--doctor-scripts
|
||||||
- Yarn : voir https://yarnpkg.com/en/docs/install
|
- Yarn : voir https://yarnpkg.com/en/docs/install
|
||||||
- Overmind :
|
|
||||||
* Mac : `brew install overmind`
|
|
||||||
* Linux : voir https://github.com/DarthSim/overmind#installation
|
|
||||||
|
|
||||||
#### Tests
|
#### Tests
|
||||||
|
|
||||||
|
@ -60,9 +57,18 @@ Afin d'initialiser l'environnement de développement, exécutez la commande suiv
|
||||||
|
|
||||||
### Lancement de l'application
|
### Lancement de l'application
|
||||||
|
|
||||||
overmind start
|
On lance le serveur d'application ainsi :
|
||||||
|
|
||||||
L'application tourne à l'adresse `http://localhost:3000`.
|
bin/rails server
|
||||||
|
|
||||||
|
L'application tourne alors à l'adresse `http://localhost:3000`, et utilise le mécanisme par défaut de rails pour les tâches asynchrones.
|
||||||
|
C'est ce qu'on veut dans la plupart des cas. Une exception: ça ne joue pas les tâches cron.
|
||||||
|
|
||||||
|
Pour être une peu plus proche du comportement de production, et jouer les tâches cron, on peut lancer la message queue
|
||||||
|
dans un service dédié, et indiquer à rails d'utiliser delayed_job:
|
||||||
|
|
||||||
|
bin/rake jobs:work
|
||||||
|
RAILS_QUEUE_ADAPTER=delayed_job bin/rails server
|
||||||
|
|
||||||
### Utilisateurs de test
|
### Utilisateurs de test
|
||||||
|
|
||||||
|
|
|
@ -83,10 +83,9 @@ Rails.application.configure do
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
# This is useful to run rails in development with :async queue adapter
|
# We use the async adapter by default, but delayed_job can be set using
|
||||||
if ENV['RAILS_QUEUE_ADAPTER']
|
# RAILS_QUEUE_ADAPTER=delayed_job bin/rails server
|
||||||
config.active_job.queue_adapter = ENV['RAILS_QUEUE_ADAPTER'].to_sym
|
config.active_job.queue_adapter = ENV.fetch('RAILS_QUEUE_ADAPTER', 'async').to_sym
|
||||||
end
|
|
||||||
|
|
||||||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue