Files
Discord.Net/docs/guides/deployment/deployment.md
Still Hsu 0fecdf69bb docs: Documentation December Update (#1218)
* Fix broken link (#11)

* Fix typos and improve wording

* Add information for IGuildUser

+ Add GetPermission sample
+ Add ModifyAsync remarks

* Add information for IGuildChannel

+ Add ModifyAsync remarks
+ Add GetOverwritePermissionAsync examples

* Add warning for Direction.Around

* Fix indentations and references

* Move IRole.ModifyAsync sample

* Add information for IUser

+ Add example, remarks for Get(Default)AvatarUrl
+ Add example, remarks for GetOrCreateDMChannelAsync
+ Add missing remarks/summary/returns for other properties of the class

* Change verbs used in IVoiceState summary/remarks

* Add additional explanation for IGuildUser.RoleIds

* Change verbs used in IMessage summary/remarks

* Clarify IUserMessage Add/RemoveReactionAsync samples

* Fix command handler sample typo

* Add information for DiscordSocketConfig

+ Add remarks/example to the class
+ Add remarks to AlwaysDownloadUsers

* Fix documentation for SlowMode

* Add additional remarks for Guild/TextChannelProperties

* Update DocFx.Plugins.LastModified to v1.2.0
This should drastically improve docfx build time.

* Add missing dependencies

* Update DocFx.Plugins.LastModified to v1.2.1

Improve performance

* Update DocFx.Plugins.LastModified to v1.2.2

* Clarify deployment.md

+ Rewritten .NET Core deployment strategies for better clarification
    * Split deployment types into framework-dependent and self-contained
    * Clarify the benefits of using different types of publishing
    * Include a sample of how to execute dotnet application with the dotnet command in a TIP dialog for visibility

* Update post-execution article and samples

+ This change is to reflect changes made in https://github.com/RogueException/Discord.Net/pull/1164, where CommandInfo is now passed into the CommandExecuted event as an Optional<T>

* Update DocFX.Plugin.DescriptionGenerator to v1.1.1

* Adjust according to recent CommandExecuted changes

See:
+ f549da50e0
+ 6260749095

* Add further documentation for https://github.com/RogueException/Discord.Net/pull/1037

* Add partial documentation for the precondition helper class

* Include CHANGELOG.md in docs

* Revise post-execution docs
* Fix incorrect Optional<T> usage
* Indent some sample code and add a comment reminding the user that the post-execution basic sample code is not ideal.

* Streamline docs for Attachment
+ This commit also adds further explanation for why Embeds and Attachments are read-only collections

* Add further documentation for MessageActivity and MessageApplication

* Add caching-related docs to ISocketMessageChannel

* Add missing documentation inheritance for SyncPermissionsAsync

* Streamline documentation process

This is done by changing the documentation of the implementations required by interfaces to redirect to the interface method instead (e.g., SocketDMChannel#GetMessagesAsync refer to IMessageChannel.GetMessagesAsync within the remarks of the method).

* Cleanup 92bf8363ca

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.Core/Entities/Channels/GuildChannelProperties.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.WebSocket/DiscordSocketConfig.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update according to PR suggestions

* Reword sentences of deployment article for clarification & remove mention of portability
* Fix typos/grammar errors within TextChannelProperties

* Add the logo SVG to the page navbar

* Implement changing logo image based on theme color using CSS background image

* Add a favicon

* use the purple logomark instead of white

* hack? set the title to navbar svg to read "Discord.Net Docs"
2018-12-28 08:49:02 -08:00

103 lines
3.6 KiB
Markdown

---
uid: Guides.Deployment
title: Deploying the Bot
---
# Deploying a Discord.Net Bot
After finishing your application, you may want to deploy your bot to a
remote location such as a Virtual Private Server (VPS) or another
computer so you can keep the bot up and running 24/7.
## Recommended VPS
For small-medium scaled bots, a cheap VPS (~$5) might be sufficient
enough. Here is a list of recommended VPS provider.
* [DigitalOcean](https://www.digitalocean.com/)
* Description: American cloud infrastructure provider headquartered
in New York City with data centers worldwide.
* Location(s):
* Asia: Singapore, India
* America: Canada, United States
* Europe: Netherlands, Germany, United Kingdom
* Based in: United States
* [Vultr](https://www.vultr.com/)
* Description: DigitalOcean-like
* Location(s):
* Asia: Japan, Australia, Singapore
* America: United States
* Europe: United Kingdom, France, Netherlands, Germany
* Based in: United States
* [OVH](https://www.ovh.com/)
* Description: French cloud computing company that offers VPS,
dedicated servers and other web services.
* Location(s):
* Asia: Australia, Singapore
* America: United States, Canada
* Europe: United Kingdom, Poland, Germany
* Based in: Europe
* [Scaleway](https://www.scaleway.com/)
* Description: Cheap but powerful VPS owned by [Online.net](https://online.net/).
* Location(s):
* Europe: France, Netherlands
* Based in: Europe
* [Time4VPS](https://www.time4vps.eu/)
* Description: Affordable and powerful VPS Hosting in Europe.
* Location(s):
* Europe: Lithuania
* Based in: Europe
## .NET Core Deployment
> [!NOTE]
> This section only covers the very basics of .NET Core deployment.
> To learn more about .NET Core deployment,
> visit [.NET Core application deployment] by Microsoft.
When redistributing the application - whether for deployment on a
remote machine or for sharing with another user - you may want to
publish the application; in other words, to create a
self-contained package without installing the dependencies
and the runtime on the target platform.
### Framework-dependent Deployment
To deploy a framework-dependent package (i.e. files to be used on a
remote machine with the `dotnet` command), simply publish
the package with:
* `dotnet publish -c Release`
This will create a package with the **least dependencies**
included with the application; however, the remote machine
must have `dotnet` runtime installed before the remote could run the
program.
> [!TIP]
> Do not know how to run a .NET Core application with
> the `dotnet` runtime? Navigate to the folder of the program
> (typically under `$projFolder/bin/Release`) and
> enter `dotnet program.dll` where `program.dll` is your compiled
> binaries.
### Self-contained Deployment
To deploy a self-contained package (i.e. files to be used on a remote
machine without the `dotnet` runtime), publish with a specific
[Runtime ID] with the `-r` switch.
This will create a package with dependencies compiled for the target
platform, meaning that all the required dependencies will be included
with the program. This will result in **larger package size**;
however, that means the copy of the runtime that can be run
natively on the target platform.
For example, the following command will create a Windows
executable (`.exe`) that is ready to be executed on any
Windows 10 x64 based machine:
* `dotnet publish -c Release -r win10-x64`
[.NET Core application deployment]: https://docs.microsoft.com/en-us/dotnet/core/deploying/
[Runtime ID]: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog