Skip to content

Commit

Permalink
stable
Browse files Browse the repository at this point in the history
  • Loading branch information
besoeasy committed Aug 1, 2024
1 parent 4efffff commit 3b59450
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WORKDIR /app

# Copy package.json and package-lock.json, then install dependencies
COPY package*.json ./

RUN npm install

# Install aria2 and clean up
Expand All @@ -24,8 +25,4 @@ EXPOSE 6799 6800 6881-6888
# Set environment variables (you can override these at runtime)
ENV TELEGRAMBOT=Telegram-Bot-Token

# start ari2c daemon
RUN aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all=true --rpc-listen-port=6800 --max-concurrent-downloads=5 --max-connection-per-server=5 --min-split-size=10M --follow-torrent=true --split=5 --daemon=true

# Start the application
CMD ["npm", "start"]
CMD ["/start.sh"]
7 changes: 7 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# Start aria2c in the background
aria2c --enable-rpc --rpc-listen-all --rpc-listen-port=6800 --enable-dht --dht-listen-port=6881-6888 --seed-time=2000 &

# Start the Node.js application
exec node index.js

0 comments on commit 3b59450

Please sign in to comment.