-
Notifications
You must be signed in to change notification settings - Fork 1
Platform Setup
Shravan Jambukesan edited this page Sep 3, 2020
·
7 revisions
Support for Linux has been verified with the launch of https://app2.pseudomarkets.live, our second official hosted instance which is running on a CentOS 8 server. Updated instructions for Linux deployment will be provided soon for Red Hat Enterprise Linux 8 and CentOS 8.
- Windows Server 2016+ or Windows 10 w/ IIS enabled
- Visual Studio 2019 w/ .NET Core 3.1 SDK installed
- Microsoft SQL Server 2017+ (All versions supported, including Express)
- ASP .NET Core 3.1 Hosting Bundle (https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-3.1.2-windows-hosting-bundle-installer)
Updated setup instructions are coming soon
- Clone PMUnifiedAPI and open it in VS. Open the TokenHelper.cs file found under Helpers and change the secret key to your own randomly generated secret key string. Rebuild in Release mode and publish to a new folder.
- Using SQL Server Management Studio, create a new database with the name "PseudoMarketsDB" and run the CREATE table scrips found in the DBScripts folder, modifying the target DB name with your DB in the USE statement.
- Once the tables have been created, create a new Site under IIS. You'll need to create a new directory for it to run from. Once the site has been created, change the .NET CLR type to 'Unmanaged' under App Pools. Detailed instructions on how to do this are listed here: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1
- You'll need to grant permissions to your new App Pool to access SQL Server. To do this, you need to create a new user for your SQL Server instance using SQL Server Management Studio. Right click on the Logins folder under Security and select "New Login". From here, you need to set the Login name to the IIS App Pool name in the following format: IIS APPPOOL{App_Pool_Name}. In my instance, it's set to IIS APPPOOL\PseudoMarketsApp. Grant applicable permissions under 'Server Roles' then hit OK to save.
- You need to set the connection string in the appsettings.json file in your published folder to point to our new DB. The format will be something like this: "SERVER=HostName\SQLEXPRESS;Database=PseudoMarketsDB;Integrated Security=True;Connection Timeout=30". You'll need to replace HostName with your server's hostname and SQLEXPRESS with your applicable SQL Server version or instance name.
- You'll need to insert your own API keys from Alpha Vantage, IEX Cloud, and Twelve Data into the ApiKeys table. All of these API keys are available for free and sign up is found on the respective websites. Make sure you use the Provider Names IEX, AV, and TwelveData when inserting into the table.
- Finally, copy the contents of your published folder into the directory you created for the IIS site. The app will startup and will run at the site address you specified during IIS site creation.
(c) 2019 - 2020 Pseudo Markets