From 08c759a9b659fca520fd34e1038061f5ff6926f9 Mon Sep 17 00:00:00 2001 From: hudy9x Date: Sat, 2 Nov 2024 20:38:39 +0700 Subject: [PATCH] build: add digital ocean yaml file and deploy button --- .do/deploy.template.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 .do/deploy.template.yaml diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml new file mode 100644 index 00000000..f31df400 --- /dev/null +++ b/.do/deploy.template.yaml @@ -0,0 +1,40 @@ +name: namviek +services: + - name: namviek-backend + git: + branch: main + repo_clone_url: https://github.com/hudy9x/namviek + build_command: npm install && npm run generate2 && npm run build:be + run_command: node dist/packages/be-gateway/main.js + envs: + - key: REDIS_HOST + value: + - key: NEXT_PUBLIC_FE_GATEWAY + value: + - key: MONGODB_URL + value: + + - key: JWT_VERIFY_USER_LINK_TOKEN_EXPIRED + value: 10m + - key: JWT_TOKEN_EXPIRED + value: 2d + - key: JWT_REFRESH_EXPIRED + value: 4d + - key: JWT_SECRET_KEY + value: S3cre23sdu + - key: JWT_REFRESH_KEY + value: jhiu23867sD + + instance_count: 1 + instance_size_slug: basic-xs + health_check: + http_path: /health + period_seconds: 10 + timeout_seconds: 5 + success_threshold: 1 + failure_threshold: 3 + routes: + - path: / + preserve_path_prefix: true + source_dir: /dist/packages/be-gateway + diff --git a/README.md b/README.md index 95ee3dd8..840960a4 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ Please visit [the deployment guide](https://docs.namviek.com/doc/deployment) bef [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/hudy9x/namviek/tree/main) +[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/hudy9x/namviek/tree/main) + ## Support me If you love this open source? Support its future on Ko-fi! Join the community of backers