In order to develop locally, the server can be set up as follows:
$ rvm gemset create vulcan-persistence
$ rvm gemset use vulcan-persistence
$ sudo apt install libpq-dev # Required for PostgreSQL
$ bundle install
$ bash script/testdb
$ RAILS_ENV=test rake db:create
$ RAILS_ENV=test rake db:migrate
$ RAILS_ENV=test rake test
Those are the variables you have to use:
| Variable | Description | Sample |
|---|---|---|
| POSTGRES_(HOST|PORT|USER|PASSWORD|DB) | Database access | |
| POSTGRES_SSLMODE | One of these (disable,allow,prefer,require,verify-ca,verify-full) | prefer |
| POSTGRES_CA_B64 | A base64 encoded ca certificate | |
| SECRET_KEY_BASE | Security key | |
| STREAM_CHANNEL | Postgres channel | events |
| REGION | asw region | eu-west-1 |
| SCANS_BUCKET | S3 bucket for scans | my-vulcan-scan-bucket |
| SNS_TOPIC_ARN | Sns topic arn | arn: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
Content type
Image
Digest
sha256:9c5487bdc…
Size
252.9 MB
Last updated
over 1 year ago
docker pull adevinta/vulcan-persistence