Update Readme
This commit is contained in:
parent
604de8118f
commit
c3ae113a38
1 changed files with 13 additions and 11 deletions
24
README.md
24
README.md
|
@ -5,7 +5,7 @@
|
|||
Sharedlists is a simple rails driven database for managing multiple product lists of various suppliers.
|
||||
|
||||
This app is used in conjunction with [foodsoft](https://github.com/foodcoops/foodsoft).
|
||||
Recommended [Ruby](http://ruby-lang.org/) version is 2.3 (note that 2.4 does not work).
|
||||
Recommended [Ruby](http://ruby-lang.org/) version is 2.7.
|
||||
|
||||
|
||||
## Development
|
||||
|
@ -15,7 +15,7 @@ Recommended [Ruby](http://ruby-lang.org/) version is 2.3 (note that 2.4 does not
|
|||
Copy `config/database.yml.SAMPLE` to `config/database.yml` and
|
||||
|
||||
docker-compose run --rm app bundle
|
||||
docker-compose run --rm app rake db:setup
|
||||
docker-compose run --rm app rails db:setup
|
||||
|
||||
### Run
|
||||
|
||||
|
@ -31,6 +31,8 @@ To access sharedlists, you'll need to create a user (and I guess you want admin
|
|||
> u.save!
|
||||
> exit
|
||||
|
||||
You can create more users within the web interface.
|
||||
|
||||
## Production
|
||||
|
||||
Either fetch the image, or build it:
|
||||
|
@ -39,16 +41,16 @@ Either fetch the image, or build it:
|
|||
# or
|
||||
docker build --tag sharedlists:latest --rm .
|
||||
|
||||
Then set environment variables `SECRET_TOKEN` and `DATABASE_URL` and run:
|
||||
Then set environment variables `SECRET_KEY_BASE` and `DATABASE_URL` and run:
|
||||
|
||||
docker run --name sharedlists_web \
|
||||
-e SECRET_TOKEN -e DATABASE_URL -e RAILS_FORCE_SSL=false \
|
||||
-e SECRET_KEY_BASE -e DATABASE_URL -e RAILS_FORCE_SSL=false \
|
||||
sharedlists:latest
|
||||
|
||||
To run cronjobs, start another instance:
|
||||
|
||||
docker run --name sharedlists_cron \
|
||||
-e SECRET_TOKEN -e DATABASE_URL \
|
||||
-e SECRET_KEY_BASE -e DATABASE_URL \
|
||||
sharedlists:latest ./proc-start cron
|
||||
|
||||
If you want to process incoming mails, add another instance like the previous,
|
||||
|
@ -97,19 +99,19 @@ Once you have the `sync_ftp_files` task working, you may wish to setup a
|
|||
### Email
|
||||
|
||||
Some suppliers send a regular email with an article list in the attachment. For this, an
|
||||
email server needs to be run using the rake task `mail:smtp_server`.
|
||||
email server needs to be run using the rails task `mail:smtp_server`.
|
||||
On production, you may want to run this on localhost on an unprivileged port, with a
|
||||
proper [MTA](https://en.wikipedia.org/wiki/Message_transfer_agent) in front that
|
||||
does message routing.
|
||||
|
||||
To enable this for a certain supplier, tick the checkbox _Update articles by email_. Then
|
||||
select a file format to use for importing, and the supplier's email address from which the
|
||||
email is sent. If you only want to import for mails with a subject that contains a certain
|
||||
email is sent. If you only want to import mails with a subject that contains a certain
|
||||
text (e.g. _Articles in week_), fill in the subject field as well.
|
||||
|
||||
What email address does the supplier need to send to? Users will find this after saving
|
||||
the supplier after _Send to_.
|
||||
What email address does the supplier need to send to? Users will find this after initial creating and
|
||||
saving the supplier after _Send to_.
|
||||
|
||||
This needs setting up of the environment variable `MAILER_DOMAIN`, on which you receive the
|
||||
emails. It is allowed to prefix the address, you may want to set the prefix in `MAILER_PREFIX`.
|
||||
This is useful when you're running an email server in front to route mails.
|
||||
mails. It is allowed to prefix the address, you may want to set the prefix in `MAILER_PREFIX`.
|
||||
This is useful when you're running a mail server in front to route mails.
|
Loading…
Reference in a new issue