-
Notifications
You must be signed in to change notification settings - Fork 2
Development
Myna edited this page Nov 10, 2024
·
4 revisions
cd /tmp
git clone -b develop https://github.com/Fhany-Server/ifhany.git
cd ifhany
$VISUAL .env
Configure the following values in your .env
file:
DATABASE_URL="mongodb://ifhany_db:27017/ifhany_db?directConnection=true&replicaSet=rs0"
TOKEN = "<token>"
CLIENT_ID = "<client_id>"
GUILD_ID = "<development_guild_id>"
LOCALE = "<locale>"
TZ = "<tz>"
DEVELOPER_ID="<dev_id>"
BOT_INVITE = "<bot_invite>"
So, you can run she!
yarn dev
This command will start ifhany in two containers: ifhany_app (for nodejs) and ifhany_db (for mongodb). That's all you need.
Open another terminal and use docker restart ifhany_app
if the code changes. If you want to clean up the db, close everything and use docker rm ifhany_db
and then yarn dev
.
If you are using Dockerfile with mongodb, a good approach is to install mongodb-compass
and open it to see graphically what is happening. You just need to change the ifhany_db
host to use the correct ip, here is a useful command for this purpose:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ifhany_db