{"_id":"58c116324153f90f00c179dd","parentDoc":null,"project":"5735936aafab441700723a50","__v":0,"version":{"_id":"58c10f5a2c3c720f00768b87","project":"5735936aafab441700723a50","__v":4,"createdAt":"2017-03-09T08:16:26.385Z","releaseDate":"2017-03-09T08:16:26.385Z","categories":["58c10f5a2c3c720f00768b88","58c10f5a2c3c720f00768b89","58c10f5a2c3c720f00768b8a","58c10f5a2c3c720f00768b8b","58c10f5a2c3c720f00768b8c","58c10f5a2c3c720f00768b8d","58c10f5a2c3c720f00768b8e","58c10f5a2c3c720f00768b8f","58c10f5a2c3c720f00768b90","58c10f5a2c3c720f00768b91","58c10f5a2c3c720f00768b92","58c10f5a2c3c720f00768b93","58c11574b36d8c0f006fda47","58c2cdcafc6eed3900e97640","58c2ce8afc6eed3900e97663"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"user":"573592b84b0ab120000b7d44","category":{"_id":"58c11574b36d8c0f006fda47","project":"5735936aafab441700723a50","version":"58c10f5a2c3c720f00768b87","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-03-09T08:42:28.884Z","from_sync":false,"order":1,"slug":"files","title":"Files"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-09T08:45:38.004Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"## `[DATABASE]`\nSets up four users:\n\n- `DB_USER` has only select permissions, using a password for this user is untested\n- `DB_SESSION_USER` has read/write access to the `DB_SESSION_NAME` database, this is the only\n  database that must be hosted locally for the site to work\n- `DB_IMPORT_USER` is not required for a simple mirror site but it is convenient to set up this user now\n- `DB_ROOT_USER` must match the password set in the mySQL Docker container\n\n`DB_HOST` must match the name you give the mySQL Docker container\n\n```\n[DATABASE]\n  DB_USER = anonymous\n  DB_PASS =\n\n  DB_SESSION_USER = ensrw\n  DB_SESSION_PASS = sessionuserpassword\n  DB_SESSION_NAME = ensembl_accounts\n\n  DB_IMPORT_USER = importuser\n  DB_IMPORT_PASS = importuserpassword\n\n  DB_ROOT_USER = root\n  DB_ROOT_PASSWORD = rootuserpassword\n  DB_PORT = 3306\n  DB_HOST = example-mysql\n```\n\n## `[WEBSITE]`\n\nSet `ENSEMBL_WEBSITE_HOST` to allow access to the database from any container on a standard Docker network\n\n```\n[WEBSITE]\n  ENSEMBL_WEBSITE_HOST = 172.17.0.0/255.255.0.0\n```\n\n## `[DATA_SOURCE]`\n\nAt least one core database needs to be hosted locally if you want to import new data as it is used as a\nsource for analysis names, etc when creating a new core database. The link between the key names in this\nsection and the urls they are associated with is relatively arbitrary.\n\n- `*_DB_URL` must be an ftp url under which directories containing database dumps can be found\n- `*_DB_REPLACE` is a flag controlling behaviour if databases with the same name already exist, set to 1 to overwrite\n- `*_DBs` should be a space-separated list of databases to download from this source\n- `SPECIES_DB_AUTO_EXPAND` is a space separated list of other database types to attempt to fetch for each core\n  database listed in `SPECIES_DBS`, e.g. [ variation funcgen ]\n- Due to a bug yet to be followes up, the site works with older versions of the `ensembl_accounts` database\n  but not the corresponding `release-85` version\n\n```\n[DATA_SOURCE]\n  ENSEMBL_DB_URL = ftp://ftp.ensembl.org/pub/release-85/mysql/\n  ENSEMBL_DB_REPLACE =\n  ENSEMBL_DBS =\n\n  EG_DB_URL = ftp://ftp.ensemblgenomes.org/pub/release-32/pan_ensembl/mysql/\n  EG_DB_REPLACE =\n  EG_DBS = [ ncbi_taxonomy ]\n\n  SPECIES_DB_URL = ftp://ftp.ensemblgenomes.org/pub/release-32/metazoa/mysql/\n  SPECIES_DB_REPLACE =\n  SPECIES_DB_AUTO_EXPAND =\n  SPECIES_DBS = [ melitaea_cinxia_core_32_85_1 ]\n\n  MISC_DB_URL = ftp://ftp.ensembl.org/pub/release-79/mysql/\n  MISC_DB_REPLACE =\n  MISC_DBS = [ ensembl_accounts ]\n```","excerpt":"","slug":"databaseini","type":"basic","title":"database.ini"}
## `[DATABASE]` Sets up four users: - `DB_USER` has only select permissions, using a password for this user is untested - `DB_SESSION_USER` has read/write access to the `DB_SESSION_NAME` database, this is the only database that must be hosted locally for the site to work - `DB_IMPORT_USER` is not required for a simple mirror site but it is convenient to set up this user now - `DB_ROOT_USER` must match the password set in the mySQL Docker container `DB_HOST` must match the name you give the mySQL Docker container ``` [DATABASE] DB_USER = anonymous DB_PASS = DB_SESSION_USER = ensrw DB_SESSION_PASS = sessionuserpassword DB_SESSION_NAME = ensembl_accounts DB_IMPORT_USER = importuser DB_IMPORT_PASS = importuserpassword DB_ROOT_USER = root DB_ROOT_PASSWORD = rootuserpassword DB_PORT = 3306 DB_HOST = example-mysql ``` ## `[WEBSITE]` Set `ENSEMBL_WEBSITE_HOST` to allow access to the database from any container on a standard Docker network ``` [WEBSITE] ENSEMBL_WEBSITE_HOST = 172.17.0.0/255.255.0.0 ``` ## `[DATA_SOURCE]` At least one core database needs to be hosted locally if you want to import new data as it is used as a source for analysis names, etc when creating a new core database. The link between the key names in this section and the urls they are associated with is relatively arbitrary. - `*_DB_URL` must be an ftp url under which directories containing database dumps can be found - `*_DB_REPLACE` is a flag controlling behaviour if databases with the same name already exist, set to 1 to overwrite - `*_DBs` should be a space-separated list of databases to download from this source - `SPECIES_DB_AUTO_EXPAND` is a space separated list of other database types to attempt to fetch for each core database listed in `SPECIES_DBS`, e.g. [ variation funcgen ] - Due to a bug yet to be followes up, the site works with older versions of the `ensembl_accounts` database but not the corresponding `release-85` version ``` [DATA_SOURCE] ENSEMBL_DB_URL = ftp://ftp.ensembl.org/pub/release-85/mysql/ ENSEMBL_DB_REPLACE = ENSEMBL_DBS = EG_DB_URL = ftp://ftp.ensemblgenomes.org/pub/release-32/pan_ensembl/mysql/ EG_DB_REPLACE = EG_DBS = [ ncbi_taxonomy ] SPECIES_DB_URL = ftp://ftp.ensemblgenomes.org/pub/release-32/metazoa/mysql/ SPECIES_DB_REPLACE = SPECIES_DB_AUTO_EXPAND = SPECIES_DBS = [ melitaea_cinxia_core_32_85_1 ] MISC_DB_URL = ftp://ftp.ensembl.org/pub/release-79/mysql/ MISC_DB_REPLACE = MISC_DBS = [ ensembl_accounts ] ```