radchenkoam / OTUS-postgres-2020-05

1 stars 3 forks source link

Размещение приложения person-app в кластере GKE #19

Closed radchenkoam closed 3 years ago

radchenkoam commented 4 years ago
radchenkoam commented 4 years ago
$ mkdir yandex-tank
$ touch load.yaml
$ touch ammo_local.txt
load.yaml phantom: address: 35.228.224.10:5000 instances: 50 load_profile: load_type: rps schedule: const(5000, 1m) ammofile: /var/loadtest/ammo_local.txt ammo_type: uripost console: enabled: true telegraf: enabled: false
ammo_local.txt [Host: 35.228.224.10:5000] [Connection: keep-alive] [User-Agent: Tank] [Content-Type: application/json] 0 /person
radchenkoam commented 4 years ago

docker run -v $(pwd):/var/loadtest -v $HOME/.ssh:/root/.ssh -it direvius/yandex-tank

radchenkoam commented 4 years ago

как разместить приложение в кубере

создание каталога приложения

WORKDIR /usr/src/app

установка зависимостей

package.json и package-lock.json

COPY package*.json ./

RUN npm install

Сборка для продакшн

RUN npm ci --only=production

копируем исходный код

COPY . .

EXPOSE 5000 CMD [ "node", "index.js" ]

.dockerignore node_modules npm-debug.log .gitignore
radchenkoam commented 4 years ago
radchenkoam commented 4 years ago
radchenkoam commented 4 years ago