{"id":22025478,"url":"https://github.com/belajarqywok/docpet_backend","last_synced_at":"2026-03-09T00:34:18.191Z","repository":{"id":211008409,"uuid":"727973739","full_name":"belajarqywok/Docpet_Backend","owner":"belajarqywok","description":"Back-End services that are distributed and integrated with Cloud Computing and Machine Learning services in the Docpet Application service.","archived":false,"fork":false,"pushed_at":"2026-02-12T15:24:27.000Z","size":93,"stargazers_count":3,"open_issues_count":29,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T23:49:47.942Z","etag":null,"topics":["alembic","fastapi","restful-api","swagger-ui","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CH2-PS068/Docpet_Backend","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belajarqywok.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-06T00:44:54.000Z","updated_at":"2024-07-18T04:56:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"75d55a25-4b98-458f-91e1-fec01153c761","html_url":"https://github.com/belajarqywok/Docpet_Backend","commit_stats":null,"previous_names":["belajarqywok/docpet_backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belajarqywok/Docpet_Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belajarqywok%2FDocpet_Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belajarqywok%2FDocpet_Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belajarqywok%2FDocpet_Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belajarqywok%2FDocpet_Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belajarqywok","download_url":"https://codeload.github.com/belajarqywok/Docpet_Backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belajarqywok%2FDocpet_Backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["alembic","fastapi","restful-api","swagger-ui","tensorflow"],"created_at":"2024-11-30T07:17:23.351Z","updated_at":"2026-03-09T00:34:18.173Z","avatar_url":"https://github.com/belajarqywok.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Docpet Backend Service\nemoji: 👨‍⚕️\ncolorFrom: purple\ncolorTo: green\nsdk: docker\npython_version: \"3.9\"\n---\n\n# Backend with FastAPI Docker Setup Guide\n\nThis guide walks you through setting up a FastAPI project with PostgreSQL using Docker and integrating Alembic for database migrations.\n\n## Prerequisites\n\n- Docker installed on your machine\n- Python and pip install\n```bash\npip install -r requirements.txt\n```\n\n## Step 1: Init and Setup Project\n\nRun the following commands in your terminal:\n\n```bash\ndocker-compose up -d\ndocker-compose down\n```\n\n## Step 2: Start PostgreSQL Docker Container\n```bash\npip install fastapi[all]\npip install sqlalchemy psycopg2\n```\n\n## Step 3: Start FastAPI Server\n```bash\nuvicorn app.main:app --host localhost --port 8000 --reload\n```\n\nMake a GET request to http://localhost:8000/api/healthchecker in Postman or any API testing tool to verify the response:\n```bash\n{\n    \"message\": \"Hello World!\"\n}\n```\n## Step 4: access the PostgreSQL Command Line in the Docker container and create admin role and grant\n```bash\ndocker exec -it postgres psql -U postgres\n\nCREATE USER admin WITH PASSWORD 'your_password';\n\nGRANT ALL PRIVILEGES ON DATABASE docpet TO admin;\n```\n\n## Step 5: Access PostgreSQL Docker Container Shell\n```bash\ndocker exec -it \u003ccontainer name\u003e bash\n```\n\nAccess the running Postgres database with the command:\n```bash\npsql -U admin \u003cdatabase name\u003e\n```\n\n## Step 6: Install uuid-ossp Plugin\nExecute the following SQL command to display and install the uuid-ossp extension:\n```bash\nselect * from pg_available_extensions;\n\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n```\n\n## Step 7: Initialize Alembic for Database Migrations\nExecute the following SQL command to display and install the uuid-ossp extension:\n```bash\npip install alembic\nalembic init alembic\n```\n\n## Step 8: Create a Revision File for Database Changes\n```bash\nalembic revision --autogenerate -m \"create users table\"\n```\n\n## Step 9: Apply Database Changes\n```bash\nalembic upgrade head\n```\n\n## Step 10: View Documentation\nFastAPI automatically generates API documentation complying with OpenAPI standards.\n```bash\nVisit http://localhost:8000/docs to explore the API documentation.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelajarqywok%2Fdocpet_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelajarqywok%2Fdocpet_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelajarqywok%2Fdocpet_backend/lists"}