Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
/ Ntuaflix Public archive

Ntuaflix Application (IMDb Clone) . Implemented for the Software Engineering course (ECE NTUA, 7th Semester).

License

Notifications You must be signed in to change notification settings

geokoko/Ntuaflix

Repository files navigation

NTUAflix

This guide walks you through setting up and running the NTUAflix application using Docker and docker-compose, including a FastAPI backend, MariaDB database, and Nginx as a reverse proxy.

Team Members: Kokoromytis Georgios, Tsouknida Vasiliki, Jani Spyridon, Panou Konstantina, Papanikolaou Ariadni

Prerequisites

  • Docker installed on your machine.
  • Docker Compose installed on your machine.

Setup Instructions

  1. Clone the Repository

    Firstly, clone this repository to your local machine using:

    git clone https://github.com/geokoko/Ntuaflix.git
  2. Environment Variables

    Create a .env file in the root directory of the project. This file should contain the necessary environment variables:

    DB_HOST=db
    DB_NAME=mydatabase
    DB_USER=myuser
    DB_PASSWD=mypassword

    Adjust the values according to your preferences.

  3. Generate the SSL Certificate and Key Create the following folder:

    mkdir -p nginx/certs

    Run the following command in your terminal to generate the SSL certificate (localhost.crt) and key (localhost.key). These commands create a certificate valid for 365 days:

    openssl req -newkey rsa:2048 -nodes -keyout nginx/certs/localhost.key -x509 -days 365 -out nginx/certs/localhost.crt
  4. Nginx Configuration

    Ensure the nginx/nginx.conf file is configured to reverse proxy to the FastAPI application. Here's a simple example that proxies requests to the app service:

    server {
        listen 80;
    
        location / {
            proxy_pass http://app:9876;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
  5. Running the application Ensure that no service is listening on localhost at port 3306. Then from the root directory of your project, run:

    sudo docker-compose up

About

Ntuaflix Application (IMDb Clone) . Implemented for the Software Engineering course (ECE NTUA, 7th Semester).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published