{"id":16265273,"url":"https://github.com/glours/react-java-mysql","last_synced_at":"2025-09-22T08:32:25.109Z","repository":{"id":66257828,"uuid":"329584216","full_name":"glours/react-java-mysql","owner":"glours","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-01T11:11:45.000Z","size":209,"stargazers_count":5,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T13:23:16.940Z","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/glours.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-01-14T10:42:18.000Z","updated_at":"2024-03-03T03:01:49.000Z","dependencies_parsed_at":"2023-02-21T09:01:05.019Z","dependency_job_id":null,"html_url":"https://github.com/glours/react-java-mysql","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"42653b0d3d6208fd174cca40781799f83bddb2e4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glours%2Freact-java-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glours%2Freact-java-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glours%2Freact-java-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glours%2Freact-java-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glours","download_url":"https://codeload.github.com/glours/react-java-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233660121,"owners_count":18710026,"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","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-10T17:07:56.551Z","updated_at":"2025-09-22T08:32:19.761Z","avatar_url":"https://github.com/glours.png","language":"TypeScript","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    ...\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-java-mysql_default\" with the default driver\nBuilding backend\nStep 1/17 : FROM maven:3.6.3-jdk-11 AS builder\n...\nSuccessfully tagged react-java-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-java-mysql_frontend_1 ... done\nCreating react-java-mysql_db_1       ... done\nCreating react-java-mysql_backend_1  ... done\n```\n\n## Expected result\n\nListing containers must show three containers running and the port mapping as below:\n```\n$ docker ps\nONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                  NAMES\na63dee74d79e        react-java-mysql_backend    \"java -Djava.securit…\"   39 seconds ago      Up 37 seconds                              react-java-mysql_backend_1\n6a7364c0812e        react-java-mysql_frontend   \"docker-entrypoint.s…\"   39 seconds ago      Up 33 seconds       0.0.0.0:3000-\u003e3000/tcp react-java-mysql_frontend_1\nb176b18fbec4        mysql:8.0.19                \"docker-entrypoint.s…\"   39 seconds ago      Up 37 seconds       3306/tcp, 33060/tcp    react-java-mysql_db_1\n```\n\nAfter the application starts, navigate to `http://localhost:3000` in your web browser to get a colorful message.\n![page](./output.jpg)\n\nStop and remove the containers\n```\n$ docker-compose down\nStopping react-java-mysql_backend_1  ... done\nStopping react-java-mysql_frontend_1 ... done\nStopping react-java-mysql_db_1       ... done\nRemoving react-java-mysql_backend_1  ... done\nRemoving react-java-mysql_frontend_1 ... done\nRemoving react-java-mysql_db_1       ... done\nRemoving network react-java-mysql_default\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglours%2Freact-java-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglours%2Freact-java-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglours%2Freact-java-mysql/lists"}