@@ -327,24 +327,13 @@ button bellow and fill in the environment variables for your seed user (admin):
327327[ ![ Deploy] ( https://www.herokucdn.com/deploy/button.svg )] ( https://heroku.com/deploy?template=https://github.com/automaticmode/active_workflow )
328328
329329A free Heroku plan could be used to try out ActiveWorkflow, but it wouldn't be
330- enough for real use. That's because the limited run time and automatic turning
331- off of unused workers inhibits ActiveWorkflow from running scheduled tasks.
330+ enough for real use. This is controlled by setting ` SINGLE_DYNO ` environment
331+ variable to '1'. In such a case all the processes (web, scheduler, workers) are
332+ run in a single dyno. This is only recommended for demonstration purposes,
333+ though. For production use you should unset ` SINGLE_DYNO ` (or set to an empty
334+ value) and run web, scheduler and worker dynos separately. Note: you should
335+ never create more than one scheduler dyno.
332336
333- ### Manual Heroku Deployment
334-
335- If you would like more control or intend to deploy ActiveWorkflow from a modified
336- source tree, you could do that using Heroku's command line interface.
337-
338- Please install Heroku's command line interface tool from
339- [ Heroku Toolbelt] ( https://toolbelt.heroku.com ) .
340-
341- For additional configuration options please take a look at the ` .env ` file.
342- Don't forget to set any configuration options you may require using the
343- ` heroku config ` command line tool.
344-
345- FIXME:
346- The default ActiveWorkflow configuration uses the same single dyno to run both
347- the web server and workers.
348337
349338### Deployment with Docker
350339
@@ -377,34 +366,6 @@ make build-image
377366This creates an image named ` local/active_workflow ` .
378367
379368
380- #### Deployment with Docker to Heroku
381-
382- You may prefer to use Heroku in a container mode (instead of deploying via
383- GitHub). Please be sure to login to Heroku docker registry before doing that:
384-
385- ``` sh
386- heroku container:login
387- ```
388-
389- Docker deployment to Heroku happens in two steps. Push:
390-
391- ``` sh
392- make heroku-docker-push
393- ```
394-
395- And release:
396-
397- ``` sh
398- make heroku-docker-release
399- ```
400-
401- If you no longer wish to use image based deployment to Heroku you will need to
402- reset Heroku stack to ` heroku-18 ` like this:
403-
404- ``` sh
405- heroku stack:set heroku-18
406- ```
407-
408369## Development
409370
410371### Requirements
@@ -427,11 +388,23 @@ brew install graphviz
427388
428389### Running Locally without Docker
429390
430- If you want to test out ActiveWorkflow locally you can start a demo instance
431- using a local sqlite database. First prepare the database with:
391+ ActiveWorkflow uses Postgres database to store all the data. If you have
392+ Postgres database set up all you need is set environment variable DATABASE_URL
393+ for the ActiveWorkflow to use like this:
394+
395+ ``` sh
396+ export DATABASE_URL=postgres://mydbusername:password@localhost:5432/dbname
397+ ```
398+
399+ > You can also reuse postgres docker image preconfigured for use with
400+ > ActiveWorkflow when running it with docker-compose. You can start it with
401+ > ` docker-compose up postgres ` and stop with ` Ctrl+C ` and ` docker-compose down `
402+ > afterwards.
403+
404+ Before running ActiveWorkflow you have to prepare the database with:
432405
433406``` sh
434- bundle exec rake db:create
407+ # bundle exec rake db:create # Optionally create database if you haven't created it in advance
435408bundle exec rake db:migrate
436409bundle exec rake db:seed
437410```
0 commit comments