{"id":16861301,"url":"https://github.com/rumpl/react-express-mysql","last_synced_at":"2026-04-11T01:04:30.215Z","repository":{"id":66257942,"uuid":"376021197","full_name":"rumpl/react-express-mysql","owner":"rumpl","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-11T16:53:03.000Z","size":386,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T20:47:43.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/rumpl.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":"2021-06-11T12:40:14.000Z","updated_at":"2021-06-29T13:08:37.000Z","dependencies_parsed_at":"2023-02-21T09:01:05.981Z","dependency_job_id":null,"html_url":"https://github.com/rumpl/react-express-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rumpl/react-express-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpl%2Freact-express-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpl%2Freact-express-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpl%2Freact-express-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpl%2Freact-express-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumpl","download_url":"https://codeload.github.com/rumpl/react-express-mysql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpl%2Freact-express-mysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280883926,"owners_count":26407607,"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-10-24T02:00:06.418Z","response_time":73,"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-13T14:31:16.662Z","updated_at":"2025-10-24T23:58:10.510Z","avatar_url":"https://github.com/rumpl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Compose sample application\n### React application with a NodeJS backend and a MySQL database\n\nProject structure:\n```\n.\n├── backend\n│   ├── Dockerfile\n│   ...\n├── db\n│   └── password.txt\n├── docker-compose.yaml\n├── frontend\n│   ├── ...\n│   └── Dockerfile\n└── README.md\n```\n\n[_docker-compose.yaml_](docker-compose.yaml)\n```\nservices:\n  backend:\n    build: backend\n    ports:\n      - 80:80\n      - 9229:9229\n      - 9230:9230\n    ...\n  db:\n    image: mysql:8.0.19\n    ...\n  frontend:\n    build: frontend\n    ports:\n    - 3000:3000\n    ...\n```\nThe compose file defines an application with three services `frontend`, `backend` and `db`.\nWhen deploying the application, docker-compose maps port 3000 of the frontend service container to port 3000 of the host as specified in the file.\nMake sure port 3000 on the host is not already being in use.\n\n## Deploy with docker-compose\n\n```\n$ docker-compose up -d\nCreating network \"react-express-mysql_default\" with the default driver\nBuilding backend\nStep 1/16 : FROM node:10\n ---\u003e aa6432763c11\n...\nSuccessfully tagged react-express-mysql_frontend:latest\nWARNING: Image for service frontend was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.\nCreating react-express-mysql_db_1 ... done\nCreating react-express-mysql_backend_1 ... done\nCreating react-express-mysql_frontend_1 ... done\n```\n\n## Expected result\n\nListing containers must show containers running and the port mapping as below:\n```\n$ docker ps\nCONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS                   PORTS                                                  NAMES\nf3e1183e709e        react-express-mysql_frontend   \"docker-entrypoint.s…\"   8 minutes ago       Up 8 minutes             0.0.0.0:3000-\u003e3000/tcp                                 react-express-mysql_frontend_1\n9422da53da76        react-express-mysql_backend    \"docker-entrypoint.s…\"   8 minutes ago       Up 8 minutes (healthy)   0.0.0.0:80-\u003e80/tcp, 0.0.0.0:9229-9230-\u003e9229-9230/tcp   react-express-mysql_backend_1\na434bce6d2be        mysql:8.0.19                   \"docker-entrypoint.s…\"   8 minutes ago       Up 8 minutes             3306/tcp, 33060/tcp                                    react-express-mysql_db_1\n```\n\nAfter the application starts, navigate to `http://localhost:3000` in your web browser.\n\n![page](./output.png)\n\n\nThe backend service container has the port 80 mapped to 80 on the host.\n```\n$ curl localhost:80\n{\"message\":\"Hello from MySQL 8.0.19\"}\n```\n\nStop and remove the containers\n```\n$ docker-compose down\nStopping react-express-mysql_frontend_1 ... done\nStopping react-express-mysql_backend_1  ... done\nStopping react-express-mysql_db_1       ... done\nRemoving react-express-mysql_frontend_1 ... done\nRemoving react-express-mysql_backend_1  ... done\nRemoving react-express-mysql_db_1       ... done\nRemoving network react-express-mysql_default\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumpl%2Freact-express-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumpl%2Freact-express-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumpl%2Freact-express-mysql/lists"}