Skip to content

Commit

Permalink
[FIX] bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ismoilovdevml committed Jan 9, 2024
1 parent eea77cc commit 438b80c
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions pages/guides/database/install-mongodb.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Qo'shimcha parametrlarsiz ushbu buyruq local serverdagi default `27017` portida
mongosh
```

```txt filename="Natija"
```txt filename="Natija" /7.0.3/ /2.0.2/
Current Mongosh Log ID: 655782d3c03672d6c9f0e9aa
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.0.2
Using MongoDB: 7.0.3
Expand Down Expand Up @@ -159,7 +159,7 @@ switched to db admin
3. Administrator yaratish uchun `db.createUser` buyrug'idan foydalaning. Foydalanuvchi uchun foydalanuvchi nomini `user` va `pwd` uchun parolni kiriting. Yaxshiroq xavfsizlik uchun `pwd` maydonining qiymati sifatida `passwordPrompt()` buyrug'idan foydalaning. Bu MongoDB ga parolni so'rashni aytadi. Administratorga ikkita rol bering, `userAdminAnyDatabase` va `readWriteAnyDatabase`. MongoDB sheldagi buyruqni quyidagi tarzda kiriting va `userAdmin` o'rniga haqiqiy administrator nomini almashtiring.


```json
```json {3}
db.createUser(
{
user: "userAdmin",
Expand Down Expand Up @@ -250,7 +250,7 @@ net:

Mana `mongod.conf` ni to'liq ko'rinishi

```conf filename="/etc/mongod.conf" /security:/ /authorization:/ /enabled/ /net:/ /port:/ /bindIp:/ /0.0.0.0/ /27017/
```conf filename="/etc/mongod.conf" {19-21,28-29}
# mongod.conf
# for documentation of all options, see:
Expand Down
6 changes: 3 additions & 3 deletions pages/guides/database/postgres-monitoring.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ Buni environment variable yordamida o'rnating. Bu yerda biz `DATA_SOURCE_NAME`
```bash
cd /opt/postgres_exporter
sudo nano postgres_exporter.env
```bash
```

```bash filename="/opt/postgres_exporter/postgres_exporter.env"
```bash filename="/opt/postgres_exporter/postgres_exporter.env" {2,4}
# birorta databaseni kuzatish uchun quyidagi configratsiyani o'zingizga moslab oling
DATA_SOURCE_NAME="postgresql://username:password@localhost:5432/database-name?sslmode=disable"
# yoki barcha databaselarni monitoring qilmoqchi bo'lsangi quyidagi configratsiyani o'zingizga moslab oling
Expand All @@ -74,7 +74,7 @@ sudo useradd -rs /bin/false postgres
sudo nano /etc/systemd/system/postgres_exporter.service
```

```bash filename="/etc/systemd/system/postgres_exporter.service"
```bash filename="/etc/systemd/system/postgres_exporter.service" {8-10}
[Unit]
Description=Prometheus exporter for Postgresql
Wants=network-online.target
Expand Down
40 changes: 20 additions & 20 deletions pages/guides/konteyner/dockerfile-yozish.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Ushbu qo'llanma Dockerfilelar qanday yozishni uni elementlarini ko'rib chiqamiz.

Dockerfiledagi `FROM` instructioni sizning imagengiz asosida quriladigan asosiy imageni belgilash uchun ishlatiladi. Bu yangi konteyner imegaseni yaratish uchun boshlang'ich nuqtadir. Docker imageni yaratishni boshlaganingizda, odatda uni ma'lum muhit yoki funksiyalar to'plamini ta'minlaydigan mavjud imagega asoslashni xohlaysiz. `FROM` instructioni ushbu asosiy imageni belgilaydi.

```bash /FROM/
```bash /FROM/ {1}
FROM <image>[:<tag>] [@<digest>]
#Node.js namunalar
FROM node
Expand All @@ -33,7 +33,7 @@ Dockerfile-dagi `MAINTAINER` instructioni qurilayotgan imagening muallifi yoki m

Maintainerni ko'rsatish uchun `LABEL` dan qanday foydalanish mumkinligiga misol:

```bash /MAINTAINER/ /LABEL/
```bash /MAINTAINER/ /LABEL/ {2,4}
FROM node:18
MAINTAINER Otabek Ismoilov
# LABEL bilan
Expand All @@ -46,7 +46,7 @@ Docker faylidagi `RUN` buyrug'i Docker imagedagi buyruqlarni bajarish uchun ishl

`RUN` qanday ishlatilishiga misol:

```bash /RUN/
```bash /RUN/ {4-7}
FROM ubuntu:latest

# Konteynerni yangilash va konteynerga zip, git, unzip o'rnatish
Expand All @@ -58,7 +58,7 @@ RUN apt-get update && apt-get install -y \

Javascript applicationlar uchun misol

```bash /RUN/
```bash /RUN/ {3-4}
FROM node:18

RUN npm install
Expand All @@ -70,7 +70,7 @@ Dockerfiledagi `WORKDIR` ko'rsatmasi(instructioni) Dockerfiledagi har qanday key

`WORKDIR` ga misol:

```bash /WORKDIR/
```bash /WORKDIR/ {2}
FROM python:3.9-slim
WORKDIR /usr/src/app
```
Expand All @@ -85,7 +85,7 @@ Dockerfiledagi `COPY` buyrug'i fayllar yoki jildlarni host mashinasidan qurilayo

`COPY` qanday ishlatilishiga misol:

```bash /COPY/
```bash /COPY/ {4}
FROM ubuntu:latest
RUN mkdir /myapp

Expand All @@ -96,7 +96,7 @@ app-files jildidagi fayllarni host mashinasidan image ichidagi `/myapp` jildiga

Python applicationlari uchun real namuna

```bash /COPY/
```bash /COPY/ {3}
FROM python:3.9-slim
WORKDIR /usr/src/app
COPY . /usr/src/app
Expand All @@ -110,15 +110,15 @@ Dockerfiledagi `ENV` buyrug'i konteyner ichidagi muhit o'zgaruvchilarini(environ

`ENV` insturctionlaridan foydalanishni ko'rsatadigan oddiy Dockerfile misoli:

```bash /ENV/
```bash /ENV/ {3-4}
FROM node:14

ENV NODE_ENV=production
ENV PORT=3000
```
Real mysql database uchun `ENV` ishlatilishi

```bash /ENV/
```bash /ENV/ {3-6}
FROM mysql:latest

ENV MYSQL_ROOT_PASSWORD=my-secret-pw
Expand All @@ -133,7 +133,7 @@ Dockerfile-dagi `ADD` insturctioni fayllarni, jildlarni yoki masofaviy URL-larni

`ADD` insturctioni sintaksisi quyidagicha:

```bash /ADD/
```bash /ADD/ {3}
FROM node:14

ADD myapp /usr/src/app
Expand All @@ -142,7 +142,7 @@ Bu yerda Docker build kontekstidan `myapp` nomli local jildni image ichidagi `/u

Masofaviy fayl qo'shsih quyidagicha

```bash /ADD/
```bash /ADD/ {3}
FROM python:3.9

ADD https://example.com/file.txt /app/file.txt
Expand All @@ -155,7 +155,7 @@ ADD https://example.com/file.txt /app/file.txt

CMD insturctioni sintaksisi quyidagicha:

```bash /CMD/
```bash /CMD/ {3}
FROM python:3.9

CMD ["python", "app.py"]
Expand All @@ -164,7 +164,7 @@ Ushbu misolda, ushbu imagega asoslangan konteyner ishga tushirilganda, u standar

Web Serverni ishga tushirishga misol

```bash
```bash {3}
FROM nginx:latest

CMD ["nginx", "-g", "daemon off;"]
Expand All @@ -177,7 +177,7 @@ Bu yerda CMD instructioni Nginx veb-serverini konteyner ichida ishga tushirish b

`ENTRYPOINT` instructioni sintaksisi `CMD` ga o'xshaydi:

```bash /ENTRYPOINT/
```bash /ENTRYPOINT/ {3}
FROM python:3.9

ENTRYPOINT ["python", "app.py"]
Expand All @@ -186,7 +186,7 @@ Bunday holda, `ENTRYPOINT` instructioni konteyner ishga tushirilganda Python skr

`CMD` bilan birga ishlatilishi

```bash /ENTRYPOINT/ /CMD/
```bash /ENTRYPOINT/ /CMD/ {3-4}
FROM nginx:latest

ENTRYPOINT ["nginx", "-g", "daemon off;"]
Expand All @@ -203,7 +203,7 @@ Ushbu Dockerfile Nginx serverini standart sozlamalar bilan ishga tushirish uchun

`EXPOSE` insturctionining sintaksisi oddiy:

```bash /EXPOSE/
```bash /EXPOSE/ {4}
FROM nginx:latest

# HTTP trafigi uchun 80 portini ochadi(expose)
Expand All @@ -224,7 +224,7 @@ Bu buyruq Docker-ga `80`-portni konteynerdan hostdagi `8080`-portga publish qili

Misol uchun Node.js dasturiga namuna Dockerfile

```bash /EXPOSE/
```bash /EXPOSE/ {15}
FROM node:14

WORKDIR /usr/src/app
Expand Down Expand Up @@ -252,7 +252,7 @@ Ushbu Node.js misolida `EXPOSE` insturctioni konteyner ichidagi Node.js ilovasi

`VOLUME` instructioni sintaksisiga misol:

```bash /VOLUME/
```bash /VOLUME/ {5}
# Use a base image
FROM ubuntu:latest

Expand Down Expand Up @@ -301,7 +301,7 @@ USER <username yoki UID>
`<username yoki UID>` asosiy imagedagi mavjud foydalanuvchining yoki Dockerfile-da yaratilgan foydalanuvchining usernamesi yoki UID boʻlishi mumkin.
Docker faylida USER instructionian foydalanishni ko'rsatadigan bir nechta misollar:

```bash /USER/
```bash /USER/ {5}
FROM ubuntu:latest

# Yangi foydalanuvchi "appuser" yaratadi va o'sha foydalanuvchiga o'tadi
Expand All @@ -317,7 +317,7 @@ Ushbu misolda, `useradd` yordamida `appuser` nomli yangi foydalanuvchi yaratilga

UID dan foyalanishga misol

```bash /USER/
```bash /USER/ {7}
FROM node:14
WORKDIR /usr/src/app

Expand Down
14 changes: 7 additions & 7 deletions pages/guides/web-server/nginx-load-balancing.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ nano devops-journey.uz
```
`devops-journey.uz` konfiguratsiya ochib olganimzidan keyin quyidagicha Load Balancing konfiguratsiya qilamiz.

```bash filename="/etc/nginx/sites-available/devop-journey.uz"
```bash filename="/etc/nginx/sites-available/devop-journey.uz" {1-5,8,11}
upstream backend {
server 185.168.1.21:9000;
server 185.168.1.22:9000;
Expand Down Expand Up @@ -240,7 +240,7 @@ server {
* `server_name devops-journey.uz;` `server` blokidagi konfiguratsiyani `devops-journey.uz` domeni bilan bog‘laydi. Ushbu domen uchun so'rov kelib tushganda, ushbu server blokida belgilangan konfiguratsiyalar qo'llaniladi.
```bash
```bash {2}
location / {
proxy_pass http://backend/;
proxy_set_header Host $host;
Expand Down Expand Up @@ -310,7 +310,7 @@ NGINX configuratsiyamizga quyidagi o'zgartisihni kiritamiz NGINXga reload berami
sudo nano /etc/nginx/sites-available/devop-journey.uz
```
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /ip_hash;/
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /ip_hash;/ {2,9,12}
upstream backend {
ip_hash;
server 185.168.1.21:9000;
Expand Down Expand Up @@ -365,7 +365,7 @@ Buning uchun NGINX configuratsiyamizni quyidagidek yangilaymiz va NGINXga reload
sudo nano /etc/nginx/sites-available/devop-journey.uz
```
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/ {1-5,8,11}
upstream backend {
server 185.168.1.21:9000 weight=10;
server 185.168.1.22:9000 weight=8;
Expand Down Expand Up @@ -402,7 +402,7 @@ sudo nano /etc/nginx/sites-available/devop-journey.uz
```
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/ /ip_hash;/
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/ /ip_hash;/ {2,9,12}
upstream backend {
ip_hash;
server 185.168.1.21:9000 weight=10;
Expand All @@ -427,7 +427,7 @@ NGINXda yana bir load balancing metodini qo'llashimiz mumkin bu **Least Connecti
**Least Connections** uchun NGINX configuratsiya quyidagicha
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /least_conn;/
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /least_conn;/ {2,9,12}
upstream backend {
least_conn;
server 185.168.1.21:9000 weight=10;
Expand Down Expand Up @@ -464,7 +464,7 @@ Keling bu uchun NGINX Load Balancing konfiguratsiyamizni yangilab NGINXga reload
sudo nano /etc/nginx/sites-available/devop-journey.uz
```
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/ /least_time header;/
```bash filename="/etc/nginx/sites-available/devop-journey.uz" /weight/ /least_time header;/ {2,9,12}
upstream backend {
least_time header;
server 185.168.1.21:9000 weight=10;
Expand Down
2 changes: 1 addition & 1 deletion pages/tutorials/article/gnp-monitoring.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ sudo nano /etc/systemd/system/node_exporter.service

Faylga quyidagi kodni kiriting:

```bash filename="/etc/systemd/system/node_exporter.service"
```bash filename="/etc/systemd/system/node_exporter.service" {2,7-8,12}
[Unit]
Description=Node Exporter
Wants=network-online.target
Expand Down
Loading

0 comments on commit 438b80c

Please sign in to comment.