Components
Integration
Next.js
Metadata
- Title: Integration
Customer-Specific Files and Tools
This section includes important files and tools used for integration purposes:
env.php: A PHP file for managing environmental variables..env: A file containing environment variables crucial for application configuration.client_launcher.php: A PHP script utilized for starting client-side applications.client_wallet.php: Handles operations related to the client's wallet, significant for transaction processes.api_test: A web-based application for testing each API function, primarily used during the initial phase of integration.menu: A test menu designed for launching games, mainly employed for game launching in the initial integration testing stage.
Setting up a new server
We utilize Digital Ocean for server hosting to meet our clients' needs. Our standard procedure for setting up a new server, or 'droplet' as termed by Digital Ocean, begins with deploying a snapshot from an existing server. Initially, we disable the existing URL settings using the a2dissite command.
The subsequent step is to assign a URL to the new droplet, typically registered with Ionos. Generally, we use a subdomain of cg-casino.com, formatted as {Customer Initials}-stage.cg-casino.com. We then configure the DNS settings of this URL to point towards the newly created server on Digital Ocean.
Our process continues with the modification of the Apache2 sites-available directory. This involves adding a specific .conf file, customized according to the server's needs. To activate the URL, we execute the command a2ensite http://{url}.conf. Afterwards, we reload the server configuration using systemctl reload {url} to implement these modifications.
For establishing secure HTTPS communication, we generate a certificate request via Certbot. This automates the creation and installation of SSL certificates, thereby ensuring data is transferred securely.
In the final stages, we tailor the server's configuration files for optimal integration with the client's environment. This includes editing the /var/www/integration/env.php and /var/www/integration/.env files to incorporate the appropriate URL. Additionally, we modify api_test and client_wallet settings to conform to the specific API requirements of the customer.
Once all testing on the staging site is satisfactorily completed, we clone the stage server to create a production server. This follows the same steps as above, but with a suitable production URL, typically in the format of {Customer Initials}.cg-casino.com.