Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 2.32 KB

File metadata and controls

74 lines (51 loc) · 2.32 KB

DevOps example app

CI status Count docker images pulls

This is a simple node application that shows on the main page server on which it is running and report errors to Bugsink.

Usage

docker run -p 3000:3000 -e SERVER_MESSAGE="Hexlet Awesome Server" -e SENTRY_DSN="<your dsn>" hexletcomponents/devops-example-app
# open http://0.0.0.0:3000 in browser

Requirements

  • Docker
  • Make
  • Node.js >= 20 (для локальной разработки без Docker)

Install

make setup

You may pass environment variable SERVER_MESSAGE, and its value shows on the main page.

Edit .env file to set up environment variables.

SERVER_MESSAGE="Hexlet Awesome Server"
SENTRY_DSN=<your bugsink dsn>

Getting Bugsink DSN

Bugsink runs as a local service via Docker Compose. To get the DSN:

  1. Start the services: make compose
  2. Open http://localhost:8000 and log in (admin@example.com / admin)
  3. Create a new project
  4. Copy the DSN from the project settings — it looks like: http://<key>@bugsink:8000/<project_id>
  5. Add it to your .env file:
    SENTRY_DSN=http://<key>@bugsink:8000/<project_id>
  6. Restart the app: docker compose restart app

Development

make test        # запустить тесты
make lint        # проверить код (Biome)
make lint-fix    # автоисправление (Biome)
make update-deps # обновить зависимости (ncu -u)

Start application

make start
# open http://0.0.0.0:3000 in browser

Screen of devops-example-app


Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

See most active contributors on hexlet-friends.