Update readme. Put Example_Nginx_Config.txt back where it was supposed to go.

This commit is contained in:
Jared 2021-04-15 04:36:58 -07:00 committed by Jared Goodwin
parent b8eab4c0e7
commit f8a4d015df
7 changed files with 19 additions and 157 deletions

View File

@ -49,6 +49,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lucent-sea/Remotely
fetch-depth: 0
# Test the Server URL to make sure it's valid

View File

@ -24,16 +24,23 @@ Subreddit: https://www.reddit.com/r/remotely_app/
![image](https://user-images.githubusercontent.com/20995508/113913261-f7002a00-9790-11eb-81b3-c36fb8aa536d.png)
## WARNING:
Remotely is undergoing a major overhaul for its server installation process. There will be some instability for a short time, and the documentation below may not reflect the current state. It's recommended that you use the installation scripts from the latest full release if you don't wish to participate in testing.
## Disclaimer
Hosting a Remotely server requires running an ASP.NET Core web app behind IIS (Windows), Nginx (Ubuntu), or Caddy Server (any OS). It's expected that the person deploying and maintaining the server is familiar with this process. Since this is a hobby project that I develop in between working full time and raising a family, there simply isn't time available to provide support in this capacity.
## Build Instructions
## GitHub Actions
GitHub Actions allows you to build and deploy Remotely for free from their cloud servers. Since the Windows agent can only be built on Windows, and the Mac agent can only be built on Mac, using a build platform like GitHub Actions or Azure Pipelines is the only reasonable way to build the whole project. The definitions for the build processes are located in `/.github/workflows/` folder.
I've created a cross-platform command line tool that will leverage the GitHub Actions REST API to build the project and install it on your private server. This process will also embed your server's URL into the clients, so that they won't need to prompt the end user to enter it.
I've created a cross-platform command line tool that can leverage the GitHub Actions REST API to build the project and install it on your private server. This process will also embed your server's URL into the desktop clients, so that they won't need to prompt the end user to enter it.
### Instructions for using the Remotely_Server_Installer CLI tool:
## Installation Instructions:
- You can find the `Remotely_Server_Installer` CLI tool on the [Releases page](https://github.com/lucent-sea/Remotely/releases).
- You will download and run it on the server where you'll be hosting Remotely.
- You can choose between installing the pre-built release package, or entering GitHub credentials to build and install a customized server.
- The pre-built package will not have your server's URL embedded in the clients. End users will need to enter it manually.
- If you use the pre-built package, you're done! Otherwise, follow the below steps for using the GitHub Actions integration.
- Fork the repo if you haven't already.
- Go to the Actions tab in your forked repo and make sure you can see the Build workflows.
- Before you can use Actions for the first time, there will be prompt that you must accept on this page.

View File

@ -8,9 +8,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{2CAC9A2B-1402-465F-83F8-958B4E081CA3}"
ProjectSection(SolutionItems) = preProject
Utilities\Example_Apache_Config.txt = Utilities\Example_Apache_Config.txt
Example_Nginx_Config.txt = Example_Nginx_Config.txt
Utilities\Example_Nginx_Config.txt = Utilities\Example_Nginx_Config.txt
Utilities\Get-PSCommands.ps1 = Utilities\Get-PSCommands.ps1
Utilities\Get-WindowsCommands.ps1 = Utilities\Get-WindowsCommands.ps1
Utilities\Install-RemotelyServer.ps1 = Utilities\Install-RemotelyServer.ps1
Utilities\Publish.ps1 = Utilities\Publish.ps1
Utilities\signtool.exe = Utilities\signtool.exe
EndProjectSection

View File

@ -8,6 +8,12 @@
<RootNamespace>Remotely.Server.Installer</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="publish\**" />
<EmbeddedResource Remove="publish\**" />
<None Remove="publish\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\CentOS_Caddy_Install.sh" />
<None Remove="Resources\CentOS_Nginx_Install.sh" />

View File

@ -1,75 +0,0 @@
#!/bin/bash
echo "Thanks for trying Remotely!"
echo
AppRoot=$(dirname $(readlink -f $0))
HostName=""
yum update
# Install .NET Core Runtime.
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
yum -y install apt-transport-https
yum -y update
yum -y install aspnetcore-runtime-5.0
# Install other prerequisites.
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum -y install unzip
yum -y install acl
yum -y install libc6-dev
yum -y install libgdiplus
# Install Caddy
yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy
# Configure Caddy
caddyConfig="
$HostName {
reverse_proxy 127.0.0.1:5000
}
"
echo "$caddyConfig" > /etc/caddy/Caddyfile
# Create service.
serviceConfig="[Unit]
Description=Remotely Server
[Service]
WorkingDirectory=$AppRoot
ExecStart=/usr/bin/dotnet $AppRoot/Remotely_Server.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
SyslogIdentifier=remotely
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target"
echo "$serviceConfig" > /etc/systemd/system/remotely.service
# Enable service.
systemctl enable remotely.service
# Start service.
systemctl start remotely.service
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
# Restart caddy
systemctl restart caddy

View File

@ -1,78 +0,0 @@
#!/bin/bash
echo "Thanks for trying Remotely!"
echo
AppRoot=$(dirname $(readlink -f $0))
HostName=""
echo "Using $AppRoot as the Remotely website's content directory."
UbuntuVersion=$(lsb_release -r -s)
# Install .NET Core Runtime.
wget -q https://packages.microsoft.com/config/ubuntu/$UbuntuVersion/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
add-apt-repository universe
apt-get update
apt-get -y install apt-transport-https
apt-get -y install aspnetcore-runtime-5.0
rm packages-microsoft-prod.deb
# Install other prerequisites.
apt-get -y install unzip
apt-get -y install acl
apt-get -y install libc6-dev
apt-get -y install libgdiplus
# Install Caddy
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install caddy
# Configure Caddy
caddyConfig="
$HostName {
reverse_proxy 127.0.0.1:5000
}
"
echo "$caddyConfig" > /etc/caddy/Caddyfile
# Create Remotely service.
serviceConfig="[Unit]
Description=Remotely Server
[Service]
WorkingDirectory=$AppRoot
ExecStart=/usr/bin/dotnet $AppRoot/Remotely_Server.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
SyslogIdentifier=remotely
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target"
echo "$serviceConfig" > /etc/systemd/system/remotely.service
# Enable service.
systemctl enable remotely.service
# Start service.
systemctl restart remotely.service
# Restart caddy
systemctl restart caddy
echo "Installation completed."