Compare commits
10 commits
Author | SHA1 | Date | |
---|---|---|---|
|
63bc26ab16 | ||
|
b319b9de93 | ||
|
2470b514c2 | ||
|
6a9437cad7 | ||
|
fa29bc75a6 | ||
|
970fdecda7 | ||
|
c19eda923e | ||
|
7257a2a5a9 | ||
|
84a78d82df | ||
|
19deb9c398 |
3 changed files with 15 additions and 17 deletions
3
Gemfile
3
Gemfile
|
@ -9,7 +9,6 @@ gem 'webpacker', '~> 5.0'
|
|||
gem 'turbolinks', '~> 5'
|
||||
gem 'jbuilder', '~> 2.7'
|
||||
gem 'bootsnap', '>= 1.4.4', require: false
|
||||
gem 'puma', '~> 5.0'
|
||||
|
||||
group :development, :test do
|
||||
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
||||
|
@ -43,3 +42,5 @@ gem 'will_paginate', '~> 3.0'
|
|||
gem 'whenever', '~> 0.9', require: false
|
||||
gem 'mysql2', '>=0.5'
|
||||
gem 'base32'
|
||||
|
||||
gem "webrick", "~> 1.7" # fallback for removed puma; not included in alpine
|
||||
|
|
|
@ -127,8 +127,6 @@ GEM
|
|||
mini_portile2 (~> 2.6.1)
|
||||
racc (~> 1.4)
|
||||
public_suffix (4.0.6)
|
||||
puma (5.5.2)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack-mini-profiler (2.3.3)
|
||||
|
@ -232,6 +230,7 @@ GEM
|
|||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 5.2)
|
||||
semantic_range (>= 2.3.0)
|
||||
webrick (1.7.0)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
|
@ -256,7 +255,6 @@ DEPENDENCIES
|
|||
listen (~> 3.3)
|
||||
midi-smtp-server (~> 3.0)
|
||||
mysql2 (>= 0.5)
|
||||
puma (~> 5.0)
|
||||
rack-mini-profiler (~> 2.0)
|
||||
rails (~> 6.1.4, >= 6.1.4.4)
|
||||
roo
|
||||
|
@ -271,6 +269,7 @@ DEPENDENCIES
|
|||
web-console (>= 4.1.0)
|
||||
webdrivers
|
||||
webpacker (~> 5.0)
|
||||
webrick (~> 1.7)
|
||||
whenever (~> 0.9)
|
||||
will_paginate (~> 3.0)
|
||||
|
||||
|
|
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.7.
|
||||
Recommended [Ruby](http://ruby-lang.org/) version is 2.3 (note that 2.4 does not work).
|
||||
|
||||
|
||||
## Development
|
||||
|
@ -15,7 +15,7 @@ Recommended [Ruby](http://ruby-lang.org/) version is 2.7.
|
|||
Copy `config/database.yml.SAMPLE` to `config/database.yml` and
|
||||
|
||||
docker-compose run --rm app bundle
|
||||
docker-compose run --rm app rails db:setup
|
||||
docker-compose run --rm app rake db:setup
|
||||
|
||||
### Run
|
||||
|
||||
|
@ -31,8 +31,6 @@ 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:
|
||||
|
@ -41,16 +39,16 @@ Either fetch the image, or build it:
|
|||
# or
|
||||
docker build --tag sharedlists:latest --rm .
|
||||
|
||||
Then set environment variables `SECRET_KEY_BASE` and `DATABASE_URL` and run:
|
||||
Then set environment variables `SECRET_TOKEN` and `DATABASE_URL` and run:
|
||||
|
||||
docker run --name sharedlists_web \
|
||||
-e SECRET_KEY_BASE -e DATABASE_URL -e RAILS_FORCE_SSL=false \
|
||||
-e SECRET_TOKEN -e DATABASE_URL -e RAILS_FORCE_SSL=false \
|
||||
sharedlists:latest
|
||||
|
||||
To run cronjobs, start another instance:
|
||||
|
||||
docker run --name sharedlists_cron \
|
||||
-e SECRET_KEY_BASE -e DATABASE_URL \
|
||||
-e SECRET_TOKEN -e DATABASE_URL \
|
||||
sharedlists:latest ./proc-start cron
|
||||
|
||||
If you want to process incoming mails, add another instance like the previous,
|
||||
|
@ -99,19 +97,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 rails task `mail:smtp_server`.
|
||||
email server needs to be run using the rake 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 mails with a subject that contains a certain
|
||||
email is sent. If you only want to import for 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 initial creating and
|
||||
saving the supplier after _Send to_.
|
||||
What email address does the supplier need to send to? Users will find this after saving
|
||||
the supplier after _Send to_.
|
||||
|
||||
This needs setting up of the environment variable `MAILER_DOMAIN`, on which you receive the
|
||||
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.
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue