{"id":20471393,"url":"https://github.com/statewalker/docker-stack-nodeapp","last_synced_at":"2026-03-19T16:02:07.511Z","repository":{"id":144678797,"uuid":"559514836","full_name":"statewalker/docker-stack-nodeapp","owner":"statewalker","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-28T12:16:39.000Z","size":2506,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T09:15:16.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/statewalker.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}},"created_at":"2022-10-30T11:07:51.000Z","updated_at":"2022-10-30T11:11:27.000Z","dependencies_parsed_at":"2024-03-28T13:37:04.264Z","dependency_job_id":"e39f9485-d8ee-4be7-a5c0-286d6d97d644","html_url":"https://github.com/statewalker/docker-stack-nodeapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/statewalker/docker-stack-nodeapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statewalker%2Fdocker-stack-nodeapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statewalker%2Fdocker-stack-nodeapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statewalker%2Fdocker-stack-nodeapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statewalker%2Fdocker-stack-nodeapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statewalker","download_url":"https://codeload.github.com/statewalker/docker-stack-nodeapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statewalker%2Fdocker-stack-nodeapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28806294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T06:25:51.065Z","status":"ssl_error","status_checked_at":"2026-01-27T06:25:50.640Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-15T14:15:58.352Z","updated_at":"2026-01-27T06:31:34.860Z","avatar_url":"https://github.com/statewalker.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"https://www.docker.com/blog/how-to-setup-your-local-node-js-development-environment-using-docker/\n\n## Project Structure\n\n* `docker/` - Docker configurations\n  * `dev/` - development configuration\n    * `Dockerfile` - Docker file for the development environment\n    * `docker-compose.yml` - Docker compose configuration; to launch from the root folder\n  * `prod/` - production configuration\n    * `Dockerfile` - production Docker file\n    * `docker-compose.yml` - Docker compose configuration; to launch from the root folder\n  * `traefic/` - Traefic reverse proxy configuration (manages domain names, ceritifcates etc)\n    * `docker-compose.yml` - Traefic Docker compose configuration\n* `scripts/` - shell/bash scripts \n  * `build.sh` - builds prod Docker image\n  * `dev.sh` - starts the dev configuration\n  * `kill.sh` - removes all running docker containers \n  * `run.sh` - utility script used by the `build.sh`, `start.sh` and `stop.sh`\n     to perform a command on a set of Docker compose configurations\n  * `start.sh` - starts prod applications \n  * `stop.sh` - stops prod applications\n  * `shell.sh` - connects to the dev container and opens a bash shell \n* `webapp/` - application folder\n  * `src/` - source code for this project\n  * `index.js` - the application entry point\n  * `package.json` - node configuration file\n* `.env.template` - template with default environment variables; this template is copied to the `.env` file\n  (if it was not explicity defined)\n\n## Getting Started\n\n### Development Mode\n\nTLDR:\n* `./scripts/dev.sh` - starts dev containers\n* `./scripts/shell.sh` - opens a bash shell in the running dev container\n* `./scripts/kill.sh` - kills all running containers\n\nTo launch the development configuration for the project you should run:\n```sh\n./scripts/dev.sh\n```\n\nThis scripts launches the docker containers and the application in dev mode.\nInternally it uses the `yarn dev` command in the `package.json` file.\nTo stop containers you should just exit from this shell. The script will automatically stop the docker containers.\n\nAll source files and installed packages are shared with the host.\nInternally the docker uses the current user and group IDs so the host machine should have normal read/write access to \ngenerated/installed files (ex: `node_modules/`, `yarn.lock` etc).\n\n\nTo get access to the running development container you can use the `./scripts/shell.sh` script: \n```sh\n./scripts/shell.sh\n```\n\n### Production Mode\n\nTLDR:\n* `./scripts/build.sh` - builds a prod Docker container\n* `./scripts/start.sh` - starts the production container\n* `./scripts/stop.sh` - stops the production container\n* `./scripts/kill.sh` - kills all running containers\n\n\n## Environment Variables\n\nWhen applications started with the `./scripts/dev.sh` (dev mode) or the `./scripts/start.sh` script (in production mode)\nthen it uses variables defined in the `.env`file.\nIf there is no such file found in the root directory then it is automatically created from the `.env.template`. \nThere are following parameters in this file used by Docker configurations to start applications:\n\n* `CONTEXT_NAME` - default name of the context; this name is used to prefix all services launched by Docker\n* `CONTEXT_DIR` - root directory where all data are stored\n* `CONTEXT_EMAIL` - default mail used to contact with the administrator of the site\n* `MAIN_URL` - the  main URL of the system\n* `HTTP_PORT` (default: 80) - the port of the reverse proxy (traefic)\n* `HTTPS_PORT` (default: 443) - default port of the secured http connection with the proxy \n* `TRAEFIK_DASHBOARD_HOST` (default: `traefik.localhost`) - URL of the traefic web portal\n* `TRAEFIK_DEBUG`(default: false) - flag defining if traefic shows or not debug messages\n* `DEV_HOST`- host of the dev service \n* `PROD_HOST`- host name for the production service\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatewalker%2Fdocker-stack-nodeapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatewalker%2Fdocker-stack-nodeapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatewalker%2Fdocker-stack-nodeapp/lists"}