Configuration Setup¶
Before spinning up your instance of the MedSync WebApp & Bot, you need to clone the repository and set up a few configuration files.
1. Preliminary Steps¶
-
Clone the Project Repository
-
Navigate into the Project Directory
2. Obtain a Domain and SSL Certificate¶
- If you're running locally, you can use Ngrok setup to obtain a domain and SSL certificate. Read the Ngrok setup section.
- If you're running on a server, you can use a domain you already own. Read the Acquiring a Domain section.
After you have a domain and SSL certificate, note down the domain(s) for the next step.
3. Bot & Database Configuration¶
-
Rename the file
.env.dist
to.env
. -
Open the content in
.env
: Open with nano/vim: -
Inside
.env
, modify the following: -
Update the
BOT_TOKEN
with your Telegram bot token. - Replace
ADMINS
with the Telegram IDs you wish to assign admin rights to. The bot will send a message to these users every time it starts. - Configure the PostgreSQL credentials (
POSTGRES_USER
andPOSTGRES_PASSWORD
). - Update
REDIS_PASSWORD
to prevent unauthorized access to the Redis database. - Modify the
FRONTEND_URL
with your domain (either the Ngrok FRONTEND url or your owned domain url).
4. Frontend Configuration¶
-
Navigate to the frontend directory and rename the file
.env.dist
to.env
. -
Open the content in
You should see:.env
: Open with nano/vim:Replace
https://your-domain.com
with your BACKEND URL.
What is Backend URL?
- If you're running live: this have to be your same owned purchased domain. The nginx will proxy the requests to the backend using the same domain.
- If you're using Ngrok, you need to set the
VITE_REACT_APP_API_URL=http://localhost:3779
, but the app will work only on your local machine.
You're good to go!
You have successfully configured the project. Proceed to the next step to initialize the dependencies.