-
Couldn't load subscription status.
- Fork 2
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
htmlformat)
- Establish a PostgreSQL database to act as the data storage for
requal. At this stage, you only need to create the database. Therequalapplication 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 anRproject or navigate to it usingsetwd("/srv/shiny-server/requal")inR. - We advise using the
renvpackage for managing therequalinstallation. This approach enables you to isolate eachrequalapplication 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
Rfile namedapp.Rin your application's directory. - Populate the
app.Rwith:
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
requaland 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.