{"id":20278742,"url":"https://github.com/zrierc/lks-storage-drive","last_synced_at":"2025-07-22T05:35:25.636Z","repository":{"id":237612579,"uuid":"794809439","full_name":"zrierc/lks-storage-drive","owner":"zrierc","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-02T07:07:32.000Z","size":1451,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T16:39:07.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zrierc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T02:04:52.000Z","updated_at":"2024-05-02T07:07:35.000Z","dependencies_parsed_at":"2024-05-02T20:25:33.847Z","dependency_job_id":"a92c915c-3381-48f6-830f-e51b510a699d","html_url":"https://github.com/zrierc/lks-storage-drive","commit_stats":null,"previous_names":["zrierc/lks-storage-drive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zrierc/lks-storage-drive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrierc%2Flks-storage-drive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrierc%2Flks-storage-drive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrierc%2Flks-storage-drive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrierc%2Flks-storage-drive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zrierc","download_url":"https://codeload.github.com/zrierc/lks-storage-drive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrierc%2Flks-storage-drive/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266434097,"owners_count":23927902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T13:26:03.478Z","updated_at":"2025-07-22T05:35:25.617Z","avatar_url":"https://github.com/zrierc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storage Drive\n\n#### Table of Contents:\n\n- [Overview](#overview)\n\n  - [Pre-Requisite](#pre-requisite)\n\n- [Build Setup](#build-setup)\n\n  - [Setup Environment Variables](#setup-environment-variables)\n  - [Build App](#build-app)\n  - [Bundle App](#bundle-app)\n\n- [Elastic Beanstalk Configuration](#elastic-beanstalk-configuration)\n\n  - [Environment Variables](#environment-variables)\n  - [Database Migrations](#database-migration)\n  - [Mounting File System](#mounting-file-system)\n  - [Adjust Nginx Configuration](#adjust-nginx-configuration)\n  - [Procfile](#procfile)\n\n---\n\n## Overview\n\n### Pre-Requisite\n\n1. Make sure you have [Node.js v20](https://nodejs.org/en) installed.\n2. Clone this repository.\n3. Enter the repository and install the dependencies via `npm` or `yarn`:\n\n   ```sh\n   npm install\n   ```\n\n   or\n\n   ```sh\n   yarn\n   ```\n\n---\n\n## Build Setup\n\n### Setup Environment Variables\n\nThe application require some environment variables to run properly. Create `.env` file in root directory. Template for environment variables available at [.env.example](./.env.example).\n\n### Build App\n\nTo build application you can use the following command:\n\n```sh\nnpm run build\n```\n\nor\n\n```sh\nyarn run build\n```\n\nThe code that has been built will be available in the `dist/` directory.\n\n### Bundle App\n\nFile and folder need to be included:\n\n1. `dist/` folder\n2. `package.json`\n3. `package-lock.json` or `yarn.lock`\n4. `.sequelizerc`\n5. `.env`\n6. `Procfile`\n\n\nBundle your application to zip file with following command:\n\n\n```sh\nzip -r storageapp.zip dist/ package.json yarn.lock .sequelizerc .env Procfile\n```\n\n### Start application locally\n\n1. Start the server:\n\n   ```sh\n    npm run start\n   ```\n\n   or\n\n   ```sh\n   yarn start\n   ```\n\n2. application should now be up and running at `http://\u003chost\u003e:\u003cport\u003e`. E.g [http://localhost:3000](http://localhost:3000)\n\n---\n\n## Elastic Beanstalk Configuration\n\n### Environment Variables\n\nSince the application will be deploy in Elastic Beanstalk, you need to set all environment variables using option settings inside `node-env.config` located in `.ebextensions/` directory.\n\nExample:\n\n```yaml\noption_settings:\n  - option_name: ENV_KEY\n    value: ENV_VALUE\n```\n\n### Database Migrations\n\n\u003e **Note** \u003c/br\u003e\n\u003e The command must be executed using prebuild hook script\n\nPerform migration to create required tables in database with following command:\n\n```\nnpm run db:migrate\n```\n\nThe migration script depends on the following environment variables:\n\n```\nDB_TYPE=\nDB_HOST=\nDB_PORT=\nDB_NAME=\nDB_USERNAME=\nDB_PASSWORD=\n```\n\n### Mounting File System\n\nComplete the script in the `.ebextensions/hooks/postdeploy/90_setup_efs.sh` folder to mount EFS.\n\nThe script should depends on the following environment variables:\n\n```\nFILE_SYSTEM_ID=\nSTORAGE_PATH=\n```\n\n### Adjust Nginx Configuration\n\nAdjust the application port in the `./.ebextensions/nginx/conf.d/00_application.conf` at the following line:\n\n```conf\n    proxy_pass http://127.0.0.1:\u003cport\u003e;\n```\n\n\u003e For production stage, you need to change main nginx configuration at `./.ebextensions/nginx/nginx.conf` to enable HTTPS. SSL certificate can be found at `./src/cert/nginx-selfsigned.crt` and SSL certificate key can be found at `./src/cert/nginx-selfsigned.key`.\n\n### Procfile\n\nCreate and configure `Procfile` in the root directory to ensure Elastic Beanstalk run the application properly.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrierc%2Flks-storage-drive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzrierc%2Flks-storage-drive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrierc%2Flks-storage-drive/lists"}