A tool for expediting curation of published research in genetic databases.
- Docker
- Docker compose
- Git
- PostgreSQL client (
pg_dump
andpsql
commands)
- Clone repo
git clone https://github.com/FlyBase/fast-track-your-paper.git
cd fast-track-your-paper
- Create credentials file
touch .env
Edit the .env
to add your SVN and PostgreSQL credentials. Be sure to replace all values within the
angle brackets <>
with values for your environment.
SVN_USER=<SVN USERNAME>
SVN_PASSWORD=<SVN PASSWORD>
SRC_PGHOST=<HOSTNAME>
SRC_PGDATABASE=<DATABASE NAME>
SRC_PGPORT=<POSTGRES PORT>
SRC_PGUSER=<POSTGRES USER>
FTYP_PGPASSWORD=<FTYP DATABASE PASSWORD>
- Pull / load data and start docker containers
make
For full details see the db README.
- all - Default target that pulls data, starts the containers, and loads the data.
- up - Brings up the docker containers
- down - Brings down and removes the disk volumes
- start - Starts the docker containers
- stop - Stops the docker containers
- clean - Stops the containers, removes the disk volumes, and removes all pulled DB data.
- pull-data - Pulls data from the production Chado database.
- load-data - Loads data from the pulled sources and stores it in the docker DB container.
- build-client - Updates the header/footer and builds the compiled javascript client app.
- export-submissions - Exports the unprocessed submissions into a JSON file suitable for curation processing.
- backup-submissions - Produces a SQL data file containing all rows of the submissions table.
- restore-submissions - Restores all rows from the file produced by
backup-submissions
.
This target creates a file under db/data/
called ftyp_json.yymmdd.json
by default where yymmdd
represents the two digit year, month, and day. To override the file you need to pass a variable called
SUBMISSION_JSON
to this target.
make export-submissions SUBMISSION_JSON=db/data/my-submissions.json
make export-submissions SUBMISSION_JSON=ftyp.json
After the submissions have been exported, they will be marked as processed so that subsequent exports will ignore them.
Calls the backup_submissions.sh script to dump all rows
of the submissions table. The output is in the db/data/submissions/
directory.
Calls the restore_submissions.sh script to restore all
rows of the submissions table from the file produced by backup-submissions
. This target loads
any .sql
or .sql.gz
file in the db/data/submissions/
directory into the database.
The FTYP tool is broken up into individual docker containers. These containers include:
- api - A GraphQL interface (Postgraphile) for the Postgres database.
- client - The React UI code.
- db - The Postgres database.
- proxy - An nginx proxy server to put the API and client UI behind a single host/port interface.
Container | Internal Port | Public port |
---|---|---|
api | 5000 | |
client | 5000 | |
db | 5432 | |
proxy | 80 | 8888 |