Skip to content

pavelbezpravel/userver-demo

Repository files navigation

userver-demo

Prerequisites

git clone

Clone with --recurse-submodules option or run git submodule update --init

devcontainers/cli

npm install -g @devcontainers/cli

Requirements

  • docker 24.0.7
  • docker compose 2.21.0
  • devcontainers/cli (optional)

Build

Docker

You can build a project manually with docker. You have to build an image and run a containers with cmake commands:

docker pull pavelbezpravel/userver-demo-build-base:0.3.0

docker run \
  --rm \
  -it \
  -u 1000:1000 \
  -v "$(pwd)":/workspaces/userver-demo \
  -w "/workspaces/userver-demo" \
  pavelbezpravel/userver-demo-build-base:0.3.0 \
  cmake \
  --preset=release

docker run \
  --rm \
  -it \
  -u 1000:1000 \
  -v "$(pwd)":/workspaces/userver-demo \
  -w "/workspaces/userver-demo" \
  pavelbezpravel/userver-demo-build-base:0.3.0 \
  cmake \
  --build \
  --preset=release

Dev Container Cli

Also, you can build a project with devcontainers in an easy and convenient way. Your IDE (e.g. Clion) or code editor (e.g. VS Code) can run and attach to devcontainer.

You can use devcontainers/cli to set up environment and build the project manually via bash:

devcontainer up --workspace-folder .

devcontainer exec --workspace-folder . \
  cmake \
  --preset=release

devcontainer exec --workspace-folder . \
  cmake \
  --build \
  --preset=release

Run

You can run existing binary:

cmake-build-release/userver-demo -c configs/static_config.yaml

Also you can run dockerized application via docker compose:

docker compose up --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published