-
Notifications
You must be signed in to change notification settings - Fork 1
Server setup
To run the Requal as a Shiny application on a server, it's necessary to first prepare the environment. The specific setup steps might differ based on your operating system. Follow the relevant instructions below to install the required system dependencies on your server (for real-life examples of installation see Discussion):
- R
- RStudio Server
- Shiny Server
- PostgreSQL
- optional: Pandoc (installation of Pandoc will enable exports in
html
format)
- Establish a PostgreSQL database to act as the data storage for
requal
. At this stage, you only need to create the database. Therequal
application will define the database schema upon its initial launch. - Create a directory within your Shiny Server path (e.g.,
/srv/shiny-server/requal
). This will be the home of your application. Open this directory as anR
project or navigate to it usingsetwd("/srv/shiny-server/requal")
inR
. - We advise using the
renv
package for managing therequal
installation. This approach enables you to isolate eachrequal
application instance and operate multiple versions on the same server. - Use the following script to install
requal
:
# install.packages("renv")
renv::install("RE-QDA/requal")
renv::snapshot(prompt = FALSE)
renv::isolate()
- To update
requal
, run the script above. - Generate an
R
file namedapp.R
in your application's directory. - Populate the
app.R
with:
requal::run_app(
mode = "server",
dbname = "YOUR_DATABASE_NAME",
dbusername = "YOUR_DATABASE_OWNER",
dbpassword = "YOUR_DATABASE_PASSWORD",
credentials_path = "USER_DATABASE_NAME.sqlite",
credentials_pass = "USER_DATABASE_PASSWORD"
)
- After installing
requal
and configuring your application, reboot the Shiny Server service using the terminal command:
sudo systemctl restart shiny-server
Your requal
application instance should now be accessible via the Shiny Server.
As the administrator of the installation, you can dictate the level of access management to the application (e.g., restricting access to a firewall-protected VPN).
To supply passwords from your secrets' store, use the keyring
package. Consult the keyring documentation for more information.
The handling of user logins and passwords by requal
is explained in the shinymanager
documentation. Please refer to it for more details.
The application development has been supported by The Technology Agency of the Czech Republic, project n. TL05000054.