Skip to content

Commit

Permalink
build: add digital ocean yaml file and deploy button
Browse files Browse the repository at this point in the history
  • Loading branch information
hudy9x committed Nov 2, 2024
1 parent 9252971 commit 08c759a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .do/deploy.template.yaml
Original file line number Diff line number Diff line change
@@ -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: <redis host >
- key: NEXT_PUBLIC_FE_GATEWAY
value: <vercel url>
- key: MONGODB_URL
value: <mongodb url>

- 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

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 08c759a

Please sign in to comment.