From b93ca6aee5dd1b8a854e7f75463ba3b4d7bbc481 Mon Sep 17 00:00:00 2001 From: rootimes Date: Wed, 25 Jun 2025 23:02:30 +0800 Subject: [PATCH 1/3] Fix: typo in NODE_ENV variable in .env.sample --- .env.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index 3930b3f..3452e8f 100644 --- a/.env.sample +++ b/.env.sample @@ -3,5 +3,5 @@ MAIL_PASSWORD=my-app-password MAIL_USERNAME=mail@example.com MAIL_SERVICE=gmail PORT=5000 -NODE_END=dev +NODE_ENV=dev GITHUB_TOKEN=a-gh-token \ No newline at end of file From 62bea8d7e03675f764e77f8813b546aa01446c8c Mon Sep 17 00:00:00 2001 From: rootimes Date: Wed, 25 Jun 2025 23:06:07 +0800 Subject: [PATCH 2/3] chore: add docker compose file --- compose.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..c60b449 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,18 @@ +services: + drawdb-server: + image: node:20-alpine + container_name: drawdb-server + ports: + - ${PORT:-5000}:${PORT:-5000} + working_dir: /var/www/html + volumes: + - ./:/var/www/html + command: sh -c "npm install && npm run dev" + networks: + - default + env_file: + - .env + +networks: + default: + driver: bridge From dd013a66cbf7f2f3bed4c8fca357652cd3d2e054 Mon Sep 17 00:00:00 2001 From: rootimes Date: Wed, 25 Jun 2025 23:08:18 +0800 Subject: [PATCH 3/3] docs: update README to clarify server functions and setup instructions --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62e1971..e31859e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -Simple server to handle form submissions via email for drawDB. +This is a simple server that serves as the backend for drawDB. It has 2 functions: -### Get started +1. Send bug reports via email +2. Handle interfacing with the GitHub REST API -Set up the environment variables following `.env.sample` +### Getting Started + +Set up the environment variables by following `.env.sample` ```bash git clone https://github.com/drawdb-io/drawdb-server.git @@ -10,3 +13,9 @@ cd drawdb-server npm install npm start ``` + +### Docker Compose run in dev + +```bash +docker compose up -d +``` \ No newline at end of file