
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
tm-apps-db
Advanced tools
Apps backend database using the Sequalize library. See /models
and /migrations
.
index.js
: provides access to the DB using Sequalize APIssync.js
: command-line tool to init/synchronize the DB models.In order to view or generate an entity diagram of the database, go to ./db/docs/
and follow the instructions.
Information on using the Sequelize CLI to perform database migrations can be viewed here: http://docs.sequelizejs.com/en/latest/docs/migrations/
To perform migrations then run
$ yarn run migrate
Migrations can be reversed by running
$ yarn run migrate:undo
Read more in MIGRATIONS.md
Apps backend database is deployed as a Cloudformation stack through Drone pipelines by promote
events to a specific environment.
There are 2 Cloudformation stacks that gets deployed:
tm-apps-db-env
containing a RDS instance (postgres), a security and a subnet group, with alarms set up for CPU and Storage spacetm-apps-db-dns-env
containing a Record Set for the RDS Instance addressThe database creation is based on a hardcoded DBSnapshotIdentifier
specified in Drone file to properly support restore situations.
The following database credentials are created according to their use:
master
used for deployment pipelineconsumer
used by lambdas with read/write permissionsapi
used by APIs with read permissionsThe above credentials are injected in a migration file (sql\V001__add_roles.sql
) through prebuild.sh
script and is part of a migration step in the deployment pipeline using the Flyway tool.
This migration file is granting the right permissions on the database to the consumers
and apis
.
The credentials are stored in AWS Parameter Store in the format: /tm-apps-db/<DB_ROLE>/<username|password>
. Example: /tm-apps-db/api/username
.
DBSnapshotIdentifier
sql\V001__add_roles.sql
or create a new migration file for granting the right permissions to consumers
and apis
which will run in the deployment pipeline with flyway
. If a new migration file is added, then consider to update the prebuild.sh
script accordingly.DBSnapshotIdentifier
value in .drone.yml
fileTRIM_HORIZON
as their starting position, meaning that we can rely on the state store database streams to repopulate the missing data from the last 24hconsumers
and the apis
to point on the new database since they are pointing to the database DNS which gets updated with the new database address (default TTL is set to 60 seconds)FAQs
Apps consumer database initialiser
The npm package tm-apps-db receives a total of 128 weekly downloads. As such, tm-apps-db popularity was classified as not popular.
We found that tm-apps-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.