Skip to content

ahmetaksit/docker-python-nextjs-postgres

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Ready Application with Python Flask Backend and Next.js Frontend

This repository contains a fully Dockerized web application featuring a Python-based backend using Flask and a modern frontend built with Next.js. The setup ensures a seamless development and deployment experience, leveraging the power of Docker for containerization.

Table of Contents

Project Structure


.
├── backend
│   ├── flask.dockerfile
│   ├── app.py
│   └── ...
├── frontend
│   ├── next.dockerfile
│   ├── pages
│   └── ...
├── docker-compose.yml
└── README.md
  
Copy

Features

Next.js Frontend: A modern React framework for building fast and user-friendly web applications. Flask Backend: A lightweight Python web framework for building robust APIs. PostgreSQL Database: An open-source relational database for data storage. Docker: Containerization for easy deployment and consistent environments.

Prerequisites

Ensure you have the following installed on your machine:

Docker Docker Compose

Getting Started

Installation

Clone the repository:

git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name

Running the Application

Start the application using Docker Compose:

docker-compose up --build

This will build and start all the services defined in the docker-compose.yml file.

Environment Variables

Ensure to configure the following environment variables:

  • NEXT_PUBLIC_API_URL: The URL for the API (Next.js frontend).
  • DATABASE_URL: The connection string for the PostgreSQL database (Flask backend).

Database

The application uses PostgreSQL as the database. The database service is defined in the docker-compose.yml file and configured with default credentials.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This repository contains a fully Dockerized web application featuring a Python-based backend using Flask and a modern frontend built with Next.js. The setup ensures a seamless development and deployment experience, leveraging the power of Docker for containerization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 61.1%
  • Python 20.4%
  • Dockerfile 14.3%
  • CSS 2.7%
  • JavaScript 1.5%