Skip to content

Commit

Permalink
ycloud serverless proxy deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
disturm committed Dec 20, 2022
1 parent 5103415 commit b1ed652
Show file tree
Hide file tree
Showing 4 changed files with 2,217 additions and 0 deletions.
1 change: 1 addition & 0 deletions CORS-proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions CORS-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:22.04
COPY ./package.json ./package.json
COPY ./package-lock.json ./package-lock.json
RUN npm ci
COPY ./lib/ ./lib
COPY ./server.js ./server.js
CMD [ "node", "server.js"]
20 changes: 20 additions & 0 deletions CORS-proxy/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

export CONTAINER_REPOSITORY_NAME=cr.yandex/crprkhjar1gq4t8h8u0t/brs-extensions-proxy:latest
export SERVERLESS_CONTAINER_ID=bbamc5stve2edro7t455
export FOLDER_ID=b1gupi6tnkioua1397gl
export SA_ID=aje2oovtau2cioluf9tp


docker build -t ${CONTAINER_REPOSITORY_NAME}:latest . ;
docker push ${CONTAINER_REPOSITORY_NAME}:latest;

yc sls container revisions deploy \
--folder-id ${FOLDER_ID} \
--container-id ${SERVERLESS_CONTAINER_ID} \
--memory 256M \
--cores 1 \
--execution-timeout 30s \
--concurrency 8 \
--service-account-id ${SA_ID} \
--image "${CONTAINER_REPOSITORY_NAME}:latest";
Loading

0 comments on commit b1ed652

Please sign in to comment.