Developer Mode
This guide will help you to install the project on your local machine.
This tutorial is for development purposes only. Do not use these credentials in production.
π Prerequisites
Before you begin, please read the Contribution page and prepere your environment.
π Installation
Get files
git clone https://github.com/aXenDeveloper/vitnode.git
cd vitnode
Install dependencies
pnpm i
Prepere docker containers
pnpm docker:dev
Environment variables for Backend
Go to backend
folder and create new .env
file:
LOGIN_TOKEN_SECRET=secret
Database and Redis variables are already set in docker-compose-dev.yml
file and inside backend
config as default values.
Generate database schema
Before you move on, make sure you have a database in Docker and you're in the backend
folder.
pnpm db
Generate config
Go to previus folder
cd ..
and generate config file
pnpm config:init
Run backend
pnpm backend:dev
Run frontend
pnpm frontend:dev
Frontend should be running on port 3000
. If you want to change it go to .env
file and fill
FRONTEND_URL
variable (For example FRONTEND_URL=FRONTEND_URL=http://localhost
).
π§βπ» PGAdmin
You can use PGAdmin to manage your database. VitNode has this image in Docker Compose. To use it, you need to go to http://localhost:5050
and login with credentials:
- Email:
admin@admin.com
- Password:
admin
Check database IP
docker ps
docker inspect <container_id_with_postgres>
Now you need to find IPAddress
in Networks
section. It should be something like this:
"IPAddress": "172.18.0.2",
Add server
Click on Add New Server
button and fill the values:
- Name:
VitNode
- Host name/address:
172.18.0.2
(your IP to database from previous step) - Port:
5432
- Username:
root
- Password:
root