This project contains a Nestjs-Handlebars web application source code to learn how to deploy a service web application with Axebow, the easiest Platform Engineering to deploy cloud native services.
A ready to use container image has been published at ghcr.io/eruiz/axebow-first-service:1.0
, deploy it following steps below:
-
Sign in to the Axebow web interface
-
In the Homepage, on top toolbar, press the Run Service button.
-
In the first step How to run the service, set the required fields:
-
Second step, Excecution environment, set the required fields again:
-
Tenant, choose the freemium tenant which allow to deploy services at no cost.
ImportantThe freemium tenant is limited to 2 vCPUs and 4 GB of memory for each user. Moreover, the resources and deployed services are cleaned each 2 hours. Create your own Accounts and Environments to overpass these limits.
-
CPU requirements, set 0.5
-
Memory requirements, set 0.5
-
Service name, the service unique identifier.
-
For example, if you used GitHub Packages:
-
-
Third step, Configure the service, set the domain resource that will allow to send requests to the service web application from Internet.
ImportantAt the date of writing this guide, only
axebow.cloud
subdomains are supported.To create a new domain, just press on manage resources button and write the subdomain name, Axebow will generate the domain.
Example:
The service web application doesn’t need to receive configuration injected via environment variables, so you let the Configuration parameters table empty.
-
Last step, Connect your service, create a public port, accesible from the Internet and link it to the port the container listens and the service web application attends the HTTPS requests.
-
Channel name, the communication channel unique identifier.
-
Container port, the exposed port.
TipYou can get info about the container exposed ports in the Dockerfile. If you open the Dockerfile you’ll see the container listens on port 3000.
EXPOSE 3000
-
Protocol, select HTTPS because the service is a web application.
-
Public port / Domain, select the domain created in the step 3.
-
Example:
-
-
Finally run the service web application by pressing the button Save
Navigate to the Runtime Dashboard and you’ll see the serice web application running. Click on Domains list and press on the domain URL to navigate to the web application.
Follow this steps to build and publish your own container image:
-
Clone this repository to your local computer.
git clone https://github.com/eruiz/axebow-first-service.git
-
Build the service web application and create the container image. By using a multistage build, both the application and the container image are build in only one step.
Tag the container image using the name and optionally a tag you will use to publish in the container registry.
# Build command pattern: docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG . # # Example: Build to publish in GitHub Packages. docker build -t ghcr.io/[NAMESPACE]/axebow-first-service:1.0 .
Replace
[NAMESPACE]
with the name of the personal account or organization to which you want the package to be scoped. -
Publish the container image to the Container registry.
# Authenticate to the Container registry. # # Example: If you use GitHub Packages, use a personal access token echo [GITHUB_TOKEN] | docker login ghcr.io -u [USERNAME] --password-stdin # Example: Push the container image to the Container registry docker push ghcr.io/[NAMESPACE]/axebow-first-service:1.0
Replace
[GITHUB_TOKEN]
with your personal token. Note,the GITHUB_TOKEN
must be granted with: repo, write:packages, read:packages and delete:packages permissions.