{"id":21233653,"url":"https://github.com/bdr-pro/filmfluencydockerized","last_synced_at":"2025-03-15T02:43:50.956Z","repository":{"id":240900679,"uuid":"803504025","full_name":"BDR-Pro/FilmFluencyDockerized","owner":"BDR-Pro","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-24T20:36:26.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T18:37:15.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/BDR-Pro.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":"2024-05-20T21:10:10.000Z","updated_at":"2024-05-24T20:36:30.000Z","dependencies_parsed_at":"2024-05-21T11:23:43.769Z","dependency_job_id":"15c3a905-5bac-48e3-9cd2-080081771c1e","html_url":"https://github.com/BDR-Pro/FilmFluencyDockerized","commit_stats":null,"previous_names":["bdr-pro/filmfluencydockerized"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FFilmFluencyDockerized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FFilmFluencyDockerized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FFilmFluencyDockerized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BDR-Pro%2FFilmFluencyDockerized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BDR-Pro","download_url":"https://codeload.github.com/BDR-Pro/FilmFluencyDockerized/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676707,"owners_count":20329432,"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":[],"created_at":"2024-11-20T23:59:50.420Z","updated_at":"2025-03-15T02:43:50.939Z","avatar_url":"https://github.com/BDR-Pro.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📽️ FilmFluency Dockerized Project\n\nWelcome to the FilmFluency Dockerized Project! This project sets up a comprehensive development environment using Docker, featuring a Django web application, API, Nginx, Rocket.Chat, and TeamSpeak.\n\n## 🎬 Introduction\n\nThe FilmFluency Dockerized Project provides a robust setup for developing and running the FilmFluency and FilmFluency Game projects along with supporting services. This setup uses Docker to ensure a consistent development and production environment.\n\n## 🚀 Prerequisites\n\nMake sure you have the following installed:\n\n- Docker\n- Docker Compose\n- Git\n\n## 🔧 Setup\n\n### 1. Cloning Repositories\n\nFirst, clone the necessary repositories:\n\n```sh\ngit clone https://github.com/yourusername/filmfluency.git\ngit clone https://github.com/yourusername/filmfluency-game.git\ngit clone https://github.com/yourusername/api-mobile-app.git\n```\n\n### 2. Creating Secrets\n\nCreate a `secrets` directory and add the necessary secret files:\n\n```sh\nmkdir secrets\necho \"your_django_secret_key\" \u003e secrets/django_secret.txt\necho \"your_db_password\" \u003e secrets/db_password.txt\necho \"your_email_host_password\" \u003e secrets/email_host_password.txt\necho \"your_redis_password\" \u003e secrets/redis_password.txt\necho \"your_api_secret_key\" \u003e secrets/api_secret.txt\n```\n\n### 3. Environment Variables\n\nCreate a `.env` file in the root of your project and add the following environment variables:\n\n```env\nSECRET_KEY=your_secret_key\nACCESS_KEY=your_access_key\nTAP_SECRET_KEY=your_tap_secret_key\nDB_PASS=your_db_password\nEMAIL_HOST_USER=your_email_host_user\nEMAIL_HOST_PASSWORD=your_email_host_password\nTMDB_API_KEY=your_tmdb_api_key\nRD_PASS=your_redis_password\nAPI_SECRET_KEY=your_api_secret_key\n```\n\n### 4. Docker Compose\n\nHere’s the `docker-compose.yml` file for setting up all services:\n\n```yaml\nversion: '3.8'\n\nservices:\n  web:\n    build:\n      context: .\n      dockerfile: Dockerfile.web\n    ports:\n      - \"8000:8000\"\n    env_file:\n      - .env\n    secrets:\n      - django_secret\n      - db_password\n      - email_host_password\n      - redis_password\n    depends_on:\n      - db\n      - nginx\n\n  nginx:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n    volumes:\n      - ./nginx.conf:/etc/nginx/nginx.conf\n    depends_on:\n      - web\n\n  rocket_chat:\n    image: rocketchat/rocket.chat:latest\n    environment:\n      - MONGO_URL=mongodb://mongo:27017/rocketchat\n      - ROOT_URL=http://localhost:3000\n      - PORT=3000\n    ports:\n      - \"3000:3000\"\n    depends_on:\n      - mongo\n\n  mongo:\n    image: mongo:latest\n    volumes:\n      - mongo_data:/data/db\n\n  teamspeak:\n    image: teamspeak\n    environment:\n      - TS3SERVER_LICENSE=accept\n    ports:\n      - \"9987:9987/udp\"\n      - \"10011:10011\"\n      - \"30033:30033\"\n\n  api:\n    build:\n      context: .\n      dockerfile: Dockerfile.api\n    ports:\n      - \"8080:8080\"\n    env_file:\n      - .env\n    secrets:\n      - api_secret\n\nvolumes:\n  mongo_data:\n\nsecrets:\n  django_secret:\n    file: ./secrets/django_secret.txt\n  db_password:\n    file: ./secrets/db_password.txt\n  email_host_password:\n    file: ./secrets/email_host_password.txt\n  redis_password:\n    file: ./secrets/redis_password.txt\n  api_secret:\n    file: ./secrets/api_secret.txt\n```\n\n### Combined `entrypoint.sh`\n\nHere is the `entrypoint.sh` script to handle environment variables for both web and API services:\n\n```sh\n#!/bin/sh\n\n# Read secrets and export them as environment variables\nif [ -f /run/secrets/django_secret ]; then\n  export SECRET_KEY=$(cat /run/secrets/django_secret)\nfi\n\nif [ -f /run/secrets/db_password ]; then\n  export DB_PASS=$(cat /run/secrets/db_password)\nfi\n\nif [ -f /run/secrets/email_host_password ]; then\n  export EMAIL_HOST_PASSWORD=$(cat /run/secrets/email_host_password)\nfi\n\nif [ -f /run/secrets/redis_password ]; then\n  export RD_PASS=$(cat /run/secrets/redis_password)\nfi\n\nif [ -f /run/secrets/api_secret ]; then\n  export API_SECRET_KEY=$(cat /run/secrets/api_secret)\nfi\n\n# Check which command to run\nif [ \"$1\" = \"web\" ]; then\n  shift  # Remove the first argument (\"web\")\n  exec gunicorn --workers 3 --bind 0.0.0.0:8000 FilmFluency.wsgi:application \"$@\"\nelif [ \"$1\" = \"api\" ]; then\n  shift  # Remove the first argument (\"api\")\n  exec gunicorn --workers 3 --bind 0.0.0.0:8080 api_app.wsgi:application \"$@\"\nelse\n  exec \"$@\"\nfi\n```\n\n### Dockerfile for Web Service (`Dockerfile.web`)\n\n```dockerfile\n# Use an official Python runtime as a parent image\nFROM python:3.13.0b1-slim\n\n# Set the working directory in the container\nWORKDIR /usr/src/app\n\n# Install Git, necessary libraries, and system utilities\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    libpq-dev \\\n    gcc \\\n    python3-dev \\\n    musl-dev \\\n    git \\\n    build-essential \\\n    clang \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Upgrade pip\nRUN pip install --upgrade pip setuptools\n\n# Install Gunicorn\nRUN pip install gunicorn \n\n# Clone the specific Git repositories\nRUN git clone https://github.com/yourusername/filmfluency.git\nRUN git clone https://github.com/yourusername/filmfluency-game.git\n\n# Install any needed packages specified in requirements.txt\nCOPY filmfluency/requirements.txt .\nRUN pip install -r requirements.txt\n\n# Expose port 8000 to the outside once the container has launched\nEXPOSE 8000\n\n# Copy the entrypoint script into the container\nCOPY entrypoint.sh /entrypoint.sh\nRUN chmod +x /entrypoint.sh\n\n# cd into the Django project directory\nWORKDIR /usr/src/app/filmfluency\n\n# Define the entrypoint and command to run your Django application using Gunicorn\nENTRYPOINT [\"/entrypoint.sh\"]\nCMD [\"web\"]\n```\n\n### Dockerfile for API Service (`Dockerfile.api`)\n\n```dockerfile\n# Use an official Python runtime as a parent image\nFROM python:3.13.0b1-slim\n\n# Set the working directory in the container\nWORKDIR /usr/src/app\n\n# Install Git, necessary libraries, and system utilities\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    libpq-dev \\\n    gcc \\\n    python3-dev \\\n    musl-dev \\\n    git \\\n    build-essential \\\n    clang \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Upgrade pip\nRUN pip install --upgrade pip setuptools\n\n# Install Gunicorn\nRUN pip install gunicorn\n\n# Clone the specific Git repository for the API\nRUN git clone https://github.com/yourusername/api-mobile-app.git\n\n# Install any needed packages specified in requirements.txt\nCOPY api-mobile-app/requirements.txt .\nRUN pip install -r requirements.txt\n\n# Expose port 8080 to the outside once the container has launched\nEXPOSE 8080\n\n# Copy the entrypoint script into the container\nCOPY entrypoint.sh /entrypoint.sh\nRUN chmod +x /entrypoint.sh\n\n# cd into the API project directory\nWORKDIR /usr/src/app/api-mobile-app\n\n# Define the entrypoint and command to run your API application using Gunicorn\nENTRYPOINT [\"/entrypoint.sh\"]\nCMD [\"api\"]\n```\n\n## ▶️ Running the Project\n\nTo start the entire setup, run:\n\n```sh\ndocker-compose up --build\n```\n\nThis command builds and starts all services defined in the `docker-compose.yml` file.\n\n## 📚 Services Overview\n\n- **Web**: Runs the Django application for FilmFluency.\n- **Nginx**: Serves as a reverse proxy for the web and API services.\n- **Rocket.Chat**: Provides chat functionality.\n- **MongoDB**: Database for Rocket.Chat.\n- **TeamSpeak**: Voice communication service.\n- **API**: Runs the API for the mobile app.\n\n## 🌐 Subdomains Configuration\n\nSet up subdomains for different services\n\n:\n\n- `hub.filmfluency`: Points to the Django web application.\n- `voice.filmfluency`: Points to TeamSpeak.\n- `game.filmfluency`: Points to the API service.\n\n## 🛠️ Troubleshooting\n\n- **Service Not Starting**: Check the logs for the specific service using `docker-compose logs \u003cservice_name\u003e`.\n- **Environment Variables**: Ensure all environment variables are set correctly in the `.env` file and secrets are properly created.\n- **Port Conflicts**: Make sure the ports defined in the `docker-compose.yml` file are not being used by other applications.\n\n## 🤝 Contributing\n\nWe welcome contributions! Feel free to fork the repositories, make changes, and submit pull requests.\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n\n---\n\nEnjoy developing with the FilmFluency Dockerized Project! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Ffilmfluencydockerized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdr-pro%2Ffilmfluencydockerized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdr-pro%2Ffilmfluencydockerized/lists"}