Sign inSign up

adevinta/vulcan-persistence

By adevinta

Updated over 1 year ago

Image
0

10K+

adevinta/vulcan-persistence repository overview

Build Status codecov

Vulcan Persistence

Developing

In order to develop locally, the server can be set up as follows:

  1. Install RVM according to the official instructions.
  2. Create a gemset and install the required gems by running:
$ rvm gemset create vulcan-persistence
$ rvm gemset use vulcan-persistence
$ sudo apt install libpq-dev # Required for PostgreSQL
$ bundle install
  1. Prepare the test database by running:
$ bash script/testdb
$ RAILS_ENV=test rake db:create
$ RAILS_ENV=test rake db:migrate
  1. Make sure that everything works by running:
$ RAILS_ENV=test rake test

Docker execute

Those are the variables you have to use:

VariableDescriptionSample
POSTGRES_(HOST|PORT|USER|PASSWORD|DB)Database access
POSTGRES_SSLMODEOne of these (disable,allow,prefer,require,verify-ca,verify-full)prefer
POSTGRES_CA_B64A base64 encoded ca certificate
SECRET_KEY_BASESecurity key
STREAM_CHANNELPostgres channelevents
REGIONasw regioneu-west-1
SCANS_BUCKETS3 bucket for scansmy-vulcan-scan-bucket
SNS_TOPIC_ARNSns topic arnarn:aws:sns:eu-west-1:xxx:yyy
docker build . -t vp

# Use the default config.toml customized with env variables.
docker run --env-file ./local.env vp

# Use custom config file.
docker run -v `pwd`/custom.env:/app/.env.config vr

# Optional: If you want to execute sql commands into the database after the migrations.
docker run --env-file ./local.env -v `pwd`/load.db:/tmp/load.db vp /tmp/load.db

Tag summary

Content type

Image

Digest

sha256:9c5487bdc

Size

252.9 MB

Last updated

over 1 year ago

docker pull adevinta/vulcan-persistence