This repository contains a FastAPI application with Docker Compose setup for a PostgreSQL database and pgAdmin.
- postgres-container: PostgreSQL database container.
- pgadmin: pgAdmin container for database management.
- fastapi: FastAPI application container.
- PostgreSQL: 5432
- pgAdmin: 8888
- FastAPI: 8000
-
PostgreSQL:
- POSTGRES_USER: semah
- POSTGRES_PASSWORD: semah
-
pgAdmin:
- PGADMIN_DEFAULT_EMAIL: semah@gmail.com
- PGADMIN_DEFAULT_PASSWORD: semah
The Dockerfile sets up the FastAPI application.
The main FastAPI application code.
Dependencies for the FastAPI application.
-
Clone the repository: git clone https://github.com/semahkadri/FastAPI-app.git
-
Navigate to the project directory: cd FastAPI-app
-
Build and run the Docker containers: docker-compose up --build
-
Access FastAPI at http://localhost:8000.
-
Access pgAdmin at http://localhost:8888 with credentials:
- Email: semah@gmail.com
- Password: semah