{"id":15980738,"url":"https://github.com/macbre/express-app","last_synced_at":"2026-06-14T01:31:57.201Z","repository":{"id":141987940,"uuid":"420075278","full_name":"macbre/express-app","owner":"macbre","description":"Simple dockerized Node.js app","archived":false,"fork":false,"pushed_at":"2025-12-11T18:55:28.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T23:36:37.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macbre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-10-22T11:36:26.000Z","updated_at":"2025-12-12T18:26:09.000Z","dependencies_parsed_at":"2023-04-26T01:32:49.248Z","dependency_job_id":null,"html_url":"https://github.com/macbre/express-app","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"311baedf58d498bfec76ddb15991c3659c9ce2ab"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macbre/express-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fexpress-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fexpress-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fexpress-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fexpress-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macbre","download_url":"https://codeload.github.com/macbre/express-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fexpress-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34306772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-10-08T00:22:10.323Z","updated_at":"2026-06-14T01:31:57.195Z","avatar_url":"https://github.com/macbre.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-app\nSimple dockerized Node.js app\n\n## 0. Pre-requirements\n\n* `docker` installed on your sandbox (or any other Linux machine), make sure `docker info` works\n* this repository cloned on your local machine\n\n## 1. A single container\n\n### Build it\n\n```\ndocker build -t macbre/express-app .\n```\n\n### Ways to run the container\n\n```\ndocker run macbre/express-app\n```\n\nBut wait, we can't reach the container even though it's running (`docker ps`).\n\n```\ndocker run -p 8000:3000 macbre/express-app\n```\n\n```\n$ curl -i 0:8000\nHTTP/1.1 200 OK\nX-Powered-By: Express\nContent-Type: text/html; charset=utf-8\nContent-Length: 12\nETag: W/\"c-Lve95gjOVATpfV8EL5X4nxwjKHE\"\nDate: Fri, 22 Oct 2021 12:03:13 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\nNow, stopped containers are still there. Let's make sure they're removed once they exit.\n\n### Running it permanently\n\n```\ndocker run -d -p 8000:3000 --rm --name express-app macbre/express-app\n```\n\n```\n$ docker ps\nCONTAINER ID   IMAGE                     COMMAND                  CREATED         STATUS                PORTS                                                                                                NAMES\n561fb5bffcf9   macbre/express-app        \"docker-entrypoint.s…\"   4 seconds ago   Up 2 seconds          0.0.0.0:8000-\u003e3000/tcp                                                                               express-app\n```\n\n```\n$ docker logs -f express-app\n\n\u003e express-app@1.0.0 start\n\u003e node app.js\n\nExample app listening at http://localhost:3000\nGET / 304 - - 18.661 ms\n```\n\n### Signals handling\n\n```\n$ docker run --rm -p 8000:3000 --name express-app macbre/express-app\n\n\u003e express-app@1.0.0 start\n\u003e node app.js\n\nExample app listening at http://localhost:3000\n\n# docker stop express-app\nGot SIGTERM signal\n```\n\n## 2. Docker compose\n\n```\ndocker compose pull \u0026\u0026 docker compose build\ndocker compose up\n```\n\nChecking the state of containers:\n\n```\n$ docker compose ps\nNAME                  COMMAND                  SERVICE             STATUS              PORTS\nexpress-app-app-1     \"docker-entrypoint.s…\"   app                 running (healthy)   0.0.0.0:8000-\u003e3000/tcp\nexpress-app-nginx-1   \"nginx -g 'daemon of…\"   nginx               running             0.0.0.0:8888-\u003e80/tcp\n```\n\nLogs:\n\n```\n$ docker compose logs -f app\nexpress-app-app-1  | \nexpress-app-app-1  | \u003e express-app@1.0.0 start\nexpress-app-app-1  | \u003e node app.js\nexpress-app-app-1  | \nexpress-app-app-1  | Example app listening at http://localhost:3000\nexpress-app-app-1  | ::ffff:172.19.0.1 - - [22/Oct/2021:14:46:50 +0000] \"GET / HTTP/1.1\" 200 13\nexpress-app-app-1  | ::ffff:127.0.0.1 - - [22/Oct/2021:14:47:14 +0000] \"GET / HTTP/1.1\" 200 13\nexpress-app-app-1  | ::ffff:127.0.0.1 - - [22/Oct/2021:14:47:44 +0000] \"GET / HTTP/1.1\" 200 13\n```\n\n```\n$ curl 0:8888 -s\nHello World!\n(...)\nexpress-app-nginx-1  | 172.19.0.1 - - [22/Oct/2021:15:34:09 +0000] \"GET / HTTP/1.1\" 200 13 \"-\" \"curl/7.64.1\" \"-\"\nexpress-app-app-1    | ::ffff:172.19.0.3 - - [22/Oct/2021:15:34:09 +0000] \"GET / HTTP/1.0\" 200 13\n```\n\nResources usage information:\n\n```\n$ docker stats\nCONTAINER ID   NAME                  CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O     PIDS\n4fd13135af2f   express-app-nginx-1   0.00%     1.543MiB / 16MiB      9.64%     908B / 0B         0B / 4.1kB    2\nec150fb08582   express-app-app-1     0.01%     26.27MiB / 64MiB      41.05%    1.61kB / 554B     0B / 0B       18\n```\n\nExecuting commands from inside the running container:\n\n```\n$ docker exec -it express-app-app-1 sh\n/app # ping -c1 nginx\nPING nginx (172.19.0.3): 56 data bytes\n64 bytes from 172.19.0.3: seq=0 ttl=64 time=0.629 ms\n(...)\n/app # wget nginx -O /dev/stdout -q\nHello World!\n```\n\nAnd logs:\n\n```\nexpress-app-nginx-1  | 172.19.0.2 - - [22/Oct/2021:14:58:25 +0000] \"GET / HTTP/1.1\" 200 13 \"-\" \"Wget\" \"-\"\nexpress-app-app-1    | ::ffff:172.19.0.3 - - [22/Oct/2021:14:58:25 +0000] \"GET / HTTP/1.0\" 200 13\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fexpress-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacbre%2Fexpress-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fexpress-app/lists"}