-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update hosting documentation #552
Open
Szeraax
wants to merge
1
commit into
Badgerati:develop
Choose a base branch
from
Szeraax:Issue-495
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Amazon Web Services | ||
|
||
Similar to what is found in the [Azure hosting tutorial](./Azure.md), Pode.Web does not run in stateless functions like AWS Lambdas. It can be run within containers though. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Azure | ||
|
||
If you want to run Pode.Web in the Azure environment, your only option is to use Azure Container Apps. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'll be worth mentioning the other options available in Azure as well, as ACA is just one:
This will likely be the same for AWS as well, with EKS and EC2. I'm OK with just stating that Pode.Web works with these offerings. |
||
|
||
## Azure Functions | ||
|
||
Pode.Web is a stateful/interactive framework. Because it relies on a running server component and because startup performance is quite prohibitive, it cannot run in stateless mode in Azure Functions. | ||
|
||
## Azure Container Apps | ||
|
||
Using Azure Container Apps is very similar to using Docker to host Pode.Web. You can even automate the Docker Image build process within a github workflow so that you commit and an image is built and pushed to Azure ready to go. To get started, all you really need is a working dockerfile in your github repo. You can even have the build process pull extra modules from the PSGallery, like AzBobbyTables in this example: | ||
|
||
``` | ||
# pull down the pode image | ||
FROM badgerati/pode.web:latest | ||
|
||
# or use the following for GitHub | ||
# FROM docker.pkg.github.com/badgerati/pode.web/pode.web:latest | ||
|
||
# copy over the local files to the container | ||
COPY . /usr/src/app/ | ||
|
||
# expose the port | ||
EXPOSE 80 | ||
|
||
# run the server | ||
RUN pwsh -c "Install-Module AzBobbyTables -Force" | ||
CMD [ "pwsh", "-c", "cd /usr/src/app; ./server.ps1" ] | ||
``` | ||
|
||
Then you just need to create a deployment workflow from the Azure Container Apps Deployment Center. In Container Apps, you can do things like set ENV variables for your secrets. | ||
|
||
But be warned, cold starts for PowerShell in Azure (even this Container App) are quite slow: around 30s. This solution with Azure Container Apps will need to either be always running or tolerant towards these cold starts. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just let this be
# AWS
😄