amvstrm / api

Open source anime streaming provider API with Gogoanime + Anilist for amvstrm
https://api.amvstr.me
GNU General Public License v3.0
88 stars 49 forks source link

Docker Image Support #21

Closed adgsenpai closed 11 months ago

adgsenpai commented 11 months ago

To make self-hosting much easier and scalable with your updates. The docker image will be the best CI/CD way for me. I will make a contribution later or even make this my own docker image on github images repo. You will be credited all glory to you!

You helped power animeapiv2.adgstudios.co.za for streaming.

You broke my reverse proxy method somehow not sure how you did the detection very impressive. I'd like to personally chat to you sometime and maybe reward you.

I am mad and also excited at the same time.

Thanks!

Will be working on fixing my stuff now. I might drop a pull request soon for the image suggestion.

You bastard.

adgsenpai commented 11 months ago

I hope this message finds you well. I'm writing to clear up a misunderstanding and to express my admiration for your work.

Recently, I encountered an issue with the reverse proxy method which I initially thought was due to your software. However, upon further investigation, I realized the problem was actually caused by a rule on a third-party server we were leveraging. I apologize for any confusion this may have caused and for my hasty conclusions.

I wanted to take a moment to commend you on your exceptional work. Your contributions have been a key factor in powering animeapiv2.adgstudios.co.za for streaming, and I am thoroughly impressed with your skills and dedication.

Looking ahead, I see a great opportunity for collaboration. I'm particularly interested in enhancing the scalability and ease of self-hosting through Docker integration. I plan to contribute to this aspect soon and will ensure you receive full credit for your foundational work.

Additionally, I would value the opportunity to have a personal conversation with you. Your expertise has inspired me, and I believe there is potential for mutually beneficial collaboration. I am also considering a way to appropriately reward you for your invaluable contributions to the project.

I'm currently working on resolving my setup issues and may submit a pull request soon with a suggestion for the Docker image implementation.

Thank you once again for your remarkable work. I look forward to the possibility of working together and contributing to this exciting project.

adgsenpai commented 11 months ago

502 Errors from Cloudflare Due to URL Changes Impacting Service Reliability

We have recently encountered a significant issue where both of the updated URLs in our project are consistently returning a 502 error from Cloudflare. This problem is affecting the reliability and availability of our services that depend on these URLs.

Observed Behavior

Expected Behavior

The URLs should reliably connect and return the expected data without causing Cloudflare to issue 502 errors, ensuring uninterrupted service.

Impact

Steps to Reproduce

  1. Access the updated URLs through our service.
  2. Observe the response from Cloudflare.

Possible Causes

Recommendations

  1. Investigate URL Changes: Determine the cause of the URL changes and stabilize them if possible.
  2. Resolve Cloudflare Issues: Examine and rectify the Cloudflare configuration and our server settings.
  3. Explore Alternative APIs: Consider integrating alternative APIs to ensure operational reliability.
  4. Implement Contingency Plans: Develop strategies to handle such outages, including failover mechanisms and user communication.

Additional Information

adgsenpai commented 11 months ago

PS i will make your docker image still once this fucking shit is done 👍

some work i did ... i will post it as a PR later on formally!

Dockerfile

# Stage 1: Build the application
FROM node:18.18 as builder

LABEL maintainer="adgsenpai"

# Create app directory
WORKDIR /usr/src/app

COPY . . 

# INSTALL 
RUN npm install

# EXPOSE 8080
EXPOSE 8080

CMD ["npm", "start"]

docker-compose.yml

version: '3.8'
services:
  nginx:
    image: nginx:latest
    ports:
      - "8080:80"  # Exposing port 8080 on the host to port 80 in the Nginx container
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - api1
      - api2
      - api3
      - api4 
      - redis
    networks:
      - webnet

  api1:
    image: animeapi:latest    
    networks:
      - webnet

  api2:
    image: animeapi:latest    
    networks:
      - webnet

  api3:
    image: animeapi:latest    
    networks:
      - webnet

  api4:
    image: animeapi:latest    
    networks:
      - webnet

  redis:
    image: redis:latest
    ports:
      - "6379:6379"
    networks:
      - webnet

networks:
  webnet: {}

nginx.conf

events {}

http {
    upstream animeapi {
        server api1:8080;
        server api2:8080;
        server api3:8080;
        server api4:8080; 
    }

    server {
        listen 80;

        location / {
            proxy_pass http://animeapi;
        }
    }
}

Some cool fucking stuff for you as my thanks!

NYT92 commented 11 months ago

Thanks you so much for the docker image and suggestions. I don't know much about docker stuff but I will add support for the docker image also might use your tip to improve it and do more testing stuff too.

As of right now all of the services are hosted on a free server because I don't have much money and already spend some on domain.

adgsenpai commented 11 months ago

Thanks you so much for the docker image and suggestions. I don't know much about docker stuff but I will add support for the docker image also might use your tip to improve it and do more testing stuff too.

As of right now all of the services are hosted on a free server because I don't have much money and already spend some on domain.

Amazing cool stuff you doing a great job on a free budget. Let me know if you need any funding or some cash willing to donate to you. Docker is fun stuff! I am leveraging your API also just make sure it holds the tiers for me! I am here for your support!