Magnetissimo adalah aplikasi web yang di-hosting sendiri yang mengindeks semua situs torrent populer dan menyimpan tautan magnet ke database lokal Anda.


Kami ingin menjelaskan cara menjalankan magnetissimo di:
Docker menyusun
# 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
Jika Anda akan mengakses magnetissimo di alamat selain localhost , tambahkan PHX_HOST ke variabel lingkungan Anda. Misalnya, untuk mengaksesnya di http://192.168.0.54:4000 :
- PHX_HOST=192.168.0.54
Atau mengaksesnya di 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
Pengembangan Lokal
asdf install
mix deps.get
iex -S mix phx.server
Kemudian kunjungi: http: // localhost: 4000
Semua titik akhir mengembalikan informasi yang diformat JSON.
/search Titik Akhir: http: // localhost: 4000/API/Search/: Search_term
Pencarian Mengembalikan Torrents yang cocok dengan Param search_term .
/latest : http: // localhost: 4000/API/terbaru
Pengembalian Terbaru 50 Torrents Published_at Terbaru.
Kami memiliki .tool-versions sehingga Anda dapat menggunakan ASDF untuk menginstal versi yang tepat dengan sangat mudah.
elixir 1.14.4
nodejs 19.8.1
Kemudian asdf install .
Anda juga perlu memiliki postgres yang berjalan dan mengonfigurasinya menggunakan variabel lingkungan DATABASE_URL .
Akhirnya atur database Anda dengan beberapa data dummy dan jalankan proyek.
mix deps.get
mix ecto.reset
iex -S mix phx.serverIngin berbicara tentang magnetissimo atau menyarankan fitur? Kami memiliki server perselisihan resmi.
Klik untuk bergabung dengan server Discord resmi kami