Skip to content

codingteam/codingteam.org.ru

Repository files navigation

codingteam.org.ru Docker Image

This is the code that services codingteam.org.ru website.

Prerequisites

To build the application, you'll need to install .NET SDK 8.0+.

To run the application, .NET Runtime 8.0 is required.

Configure

The only configuration parameter is the HTTP binding. Change the binding using ASPNETCORE_URLS environment variable. For example, ASPNETCORE_URLS=http://0.0.0.0:80 means listening port 80 for all addresses. The default setting is http://localhost:5000.

Build

Build the project:

$ npm run build
$ dotnet build

Run

$ dotnet run --project Codingteam.Site

Publish

Prepare the production-ready distribution in the publish directory:

$ dotnet publish --configuration Release --output publish Codingteam.Site

This application uses Docker for deployment. To create a Docker image, use the following command:

$ docker build -t codingteam/codingteam.org.ru:$CODINGTEAM_ORG_RU_VERSION -t codingteam/codingteam.org.ru:latest .

(where $CODINGTEAM_ORG_RU_VERSION is the version for the image to use)

Then push the image to the Docker Hub:

$ docker login # if necessary
$ docker push codingteam/codingteam.org.ru:$CODINGTEAM_ORG_RU_VERSION
$ docker push codingteam/codingteam.org.ru:latest

Deploy

To install the application from Docker, run the following command:

$ docker run -d --restart unless-stopped -p:$PORT:80 --name $NAME codingteam/codingteam.org.ru:$VERSION

Where

  • $PORT is the port you want to expose the application on
  • $NAME is the container name
  • $VERSION is the version you want to deploy, or latest for the latest available one

For example, a production server may use the following settings (note this command uses the Bash syntax; adapt for your shell if necessary):

PORT=5000
NAME=codingteam.org.ru
VERSION=latest
docker pull codingteam/codingteam.org.ru:$VERSION
docker rm -f $NAME
docker run -d --restart unless-stopped -p $PORT:80 --name $NAME codingteam/codingteam.org.ru:$VERSION

Documentation