Dokploy Bot, reboot

Hello I am hosting a discord bot on github connected to dokploy cuz idk another way, can I have this bot restart once a day? If so how do I set this up?
13 Replies
🎗 Timmy 🎗
Please ping me with replys.
DJKnaeckebrot
DJKnaeckebrot•5mo ago
There currently is no "native" way for cron jobs, but you can make a cron on your host system and use the API to stop and start your discord bot https://docs.dokploy.com/docs/api/reference-application#application-stop https://docs.dokploy.com/docs/api/reference-application#application-start If its a compose you just need to check the compose part
🎗 Timmy 🎗
Okay thanks Do you know how I can fix these issues Error: Cannot find module 'dayjs' I tried to use npm install dayjs doesn't work
DJKnaeckebrot
DJKnaeckebrot•5mo ago
Where does this occour?
🎗 Timmy 🎗
I have fixed the error by just adding them in Can I run a lava link on Dokploy?
DJKnaeckebrot
DJKnaeckebrot•5mo ago
You'll need to pack in a docker image but yes can. There might already be an docker image for it
🎗 Timmy 🎗
Can you share how by chance? I am still new to this
DJKnaeckebrot
DJKnaeckebrot•5mo ago
services:
lavalink:
# pin the image version to Lavalink v4
image: ghcr.io/lavalink-devs/lavalink:4
container_name: lavalink
restart: unless-stopped
environment:
# set Java options here
- _JAVA_OPTIONS=-Xmx6G
# set lavalink server port
- SERVER_PORT=2333
# set password for lavalink
- LAVALINK_SERVER_PASSWORD=youshallnotpass
volumes:
# mount application.yml from the same directory or use environment variables
- ../files/application.yml:/opt/Lavalink/application.yml
# persist plugins between restarts, make sure to set the correct permissions (user: 322, group: 322)
- ../files/plugins/:/opt/Lavalink/plugins/
expose:
# lavalink exposes port 2333 to connect to for other containers (this is for documentation purposes only)
- 2333
ports:
# you only need this if you want to make your lavalink accessible from outside of containers
- 2333
services:
lavalink:
# pin the image version to Lavalink v4
image: ghcr.io/lavalink-devs/lavalink:4
container_name: lavalink
restart: unless-stopped
environment:
# set Java options here
- _JAVA_OPTIONS=-Xmx6G
# set lavalink server port
- SERVER_PORT=2333
# set password for lavalink
- LAVALINK_SERVER_PASSWORD=youshallnotpass
volumes:
# mount application.yml from the same directory or use environment variables
- ../files/application.yml:/opt/Lavalink/application.yml
# persist plugins between restarts, make sure to set the correct permissions (user: 322, group: 322)
- ../files/plugins/:/opt/Lavalink/plugins/
expose:
# lavalink exposes port 2333 to connect to for other containers (this is for documentation purposes only)
- 2333
ports:
# you only need this if you want to make your lavalink accessible from outside of containers
- 2333
idk if that will work, was the first one i found https://lavalink.dev/configuration/docker
Docker - Lavalink Docs
How to run Lavalink as a Docker container
🎗 Timmy 🎗
Will that be this one?
DJKnaeckebrot
DJKnaeckebrot•5mo ago
you need to add a compose not an application
🎗 Timmy 🎗
Ah okay It is now working Now to get it to connect visa domain do I just add my domain?

Did you find this page helpful?