{"id":25939047,"url":"https://github.com/cyrillesaga/spring-postgres-docker","last_synced_at":"2026-04-09T23:48:36.115Z","repository":{"id":279858727,"uuid":"940236224","full_name":"CyrilleSaga/spring-postgres-docker","owner":"CyrilleSaga","description":"This project is a simple Spring Boot application that demonstrates how to use Docker and Docker Compose to run a Spring Boot application with a PostgreSQL database.","archived":false,"fork":false,"pushed_at":"2025-02-27T20:49:31.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T05:32:40.823Z","etag":null,"topics":["boot","containers","docker","docker-compose","image","java","postgresql","spring","template"],"latest_commit_sha":null,"homepage":"","language":"Java","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/CyrilleSaga.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":"2025-02-27T20:45:51.000Z","updated_at":"2025-02-27T20:51:13.000Z","dependencies_parsed_at":"2025-02-28T05:32:49.207Z","dependency_job_id":"04fd6f65-c4b0-4690-ab19-86ec334e9210","html_url":"https://github.com/CyrilleSaga/spring-postgres-docker","commit_stats":null,"previous_names":["cyrillesaga/spring-postgres-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrilleSaga%2Fspring-postgres-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrilleSaga%2Fspring-postgres-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrilleSaga%2Fspring-postgres-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrilleSaga%2Fspring-postgres-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyrilleSaga","download_url":"https://codeload.github.com/CyrilleSaga/spring-postgres-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780495,"owners_count":20019061,"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":["boot","containers","docker","docker-compose","image","java","postgresql","spring","template"],"created_at":"2025-03-04T04:15:32.845Z","updated_at":"2025-12-02T05:03:39.300Z","avatar_url":"https://github.com/CyrilleSaga.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Docker Demo\n\nThis project is a simple Spring Boot application that demonstrates how to use Docker and Docker Compose to run a Spring Boot application with a PostgreSQL database.\n\n## Prerequisites\n\n- Docker\n- Docker Compose\n- Java 21\n- Maven\n\n## Project Structure\n\n- `src/main/java/com/demo/docker/controllers/TestController.java`: Contains the REST API endpoints.\n- `docker-compose.yml`: Defines the Docker services for the application and PostgreSQL database.\n- `Dockerfile`: Builds the Docker image for the Spring Boot application.\n\n## Running the Application\n\n1. **Build the Docker images:**\n\n    ```sh\n    docker-compose build\n    ```\n\n2. **Start the services:**\n\n    ```sh\n    docker-compose up\n    ```\n\n3. The Spring Boot application will be available at `http://localhost:8080`.\n\n## API Endpoints\n\n- **POST /**: Create a new test entity.\n- **GET /**: Retrieve all test entities.\n- **GET /{id}**: Retrieve a test entity by its ID.\n- **DELETE /delete/{id}**: Delete a test entity by its ID.\n\n## Configuration\n\nThe application uses the following environment variables for database configuration:\n\n- `SPRING_DATASOURCE_URL`\n- `SPRING_DATASOURCE_USERNAME`\n- `SPRING_DATASOURCE_PASSWORD`\n\nThese are set in the `docker-compose.yml` file.\n\n## Building and Running Locally\n\nTo build and run the application locally without Docker:\n\n1. **Build the project:**\n\n    ```sh\n    mvn clean package\n    ```\n\n2. **Run the application:**\n\n    ```sh\n    java -jar target/*.jar\n    ```\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrillesaga%2Fspring-postgres-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrillesaga%2Fspring-postgres-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrillesaga%2Fspring-postgres-docker/lists"}