Description Usage Arguments Value
Facilitate connection to a docker container reunning a mysql database between inside the docker container Connection parameters are passed as environment variables to the docker container. Use these to create a RMySQL connection object. Note on password files Such files are only available containers started in swarm mode (docker stack deploy) Use the environment variable envpassword = "HARVESTER_DB_PASSWORD_FILE" to pass a file otherwise use HARVESTER_DB_PASSWORD to pass the password directly.
1 2 3 4 5 6 7 | dbconnectdocker(
dbname = "tradeflows",
envuser = "HARVESTER_DB_USER",
envpassword = "HARVESTER_DB_PASSWORD",
envhost = "HARVESTER_DB_HOST",
envport = "HARVESTER_DB_PORT"
)
|
envuser |
name of the environment variable that contains the user name |
envpassword |
name of the environment variable that contains the password |
envhost |
name of the environment variable that contains the db host name |
a RMySQL connection object. HARVESTER_DB_HOST: tradeflowsdb:3306 HARVESTER_DB_USER: R HARVESTER_DB_PASSWORD_FILE: /run/secrets/db_password
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.