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 diff --git a/README.md b/README.md index f4c09dc..e31859e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ This is a simple server that serves as the backend for drawDB. It has 2 functions: -1. Send bug reports via mail -2. Handle interfacing with the GitHub rest api +1. Send bug reports via email +2. Handle interfacing with the GitHub REST API -### Get started +### Getting Started -Set up the environment variables following `.env.sample` +Set up the environment variables by following `.env.sample` ```bash git clone https://github.com/drawdb-io/drawdb-server.git @@ -13,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 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