Magnetissimo es una aplicación web autohospedada que indexa todos los sitios de torrent populares y guarda los enlaces magnet a su base de datos local.


Queremos explicar cómo ejecutar magnetissimo en:
Docker componer
# Generate a secret_key with either
openssl rand -base64 64
mix phx.gen.secret
# Enter that key as SECRET_KEY_BASE in the docker-compse.yml file
SECRET_KEY_BASE=YourKeyGoesHere
# Start the application
docker compose up -d
Si va a acceder a MagnetissImo en una dirección además de localhost , agregue PHX_HOST a sus variables de entorno. Por ejemplo, para acceder a él en http://192.168.0.54:4000 :
- PHX_HOST=192.168.0.54
O para acceder a él en https://magnetissimo.domain.tld :
- PHX_HOST=magnetissimo.domain.tld
Kubernetes
# Generate a secret_key with either
openssl rand -base64 64
mix phx.gen.secret
Edit the k8s/deployment.yaml file, and replace the ENV SECRET_KEY_BASE with your generated key.
Edit k8s/ingress.yaml & the PHX_HOST in k8s/deployment.yaml and replace the host with your domain name.
The Postgres database is configured to use the DNS name assuming it is being deployed to the default namespace, update this in the enviroment variables if you are deploying to a different namespace.
Finaly, deploy the application to your cluster.
kubectl apply -f k8s/pvc.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/svc.yaml
kubectl apply -f k8s/ingress.yaml
Desarrollo local
asdf install
mix deps.get
iex -S mix phx.server
Luego visite: http: // localhost: 4000
Todos los puntos finales devuelven información formateada JSON.
/search Endpoint: http: // localhost: 4000/API/Search/: Search_term
La búsqueda devuelve torrents que coinciden con el parámetro search_term .
/latest punto final: http: // localhost: 4000/API/Último
La última devuelve los últimos 50 torrents publicados_at_at.
Tenemos un .tool-versions para que pueda usar ASDF para instalar las versiones correctas con mucha facilidad.
elixir 1.14.4
nodejs 19.8.1
Luego asdf install .
También debe tener Postgres en ejecución y configurarlo utilizando la variable de entorno DATABASE_URL .
Finalmente, configure su base de datos con algunos datos ficticios y ejecute el proyecto.
mix deps.get
mix ecto.reset
iex -S mix phx.server¿Quiere hablar sobre magnetissimo o sugerir características? Tenemos un servidor oficial de Discord.
Haga clic para unirse a nuestro servidor oficial de Discord