Skip to content

Latest commit

 

History

History
74 lines (58 loc) · 2.04 KB

File metadata and controls

74 lines (58 loc) · 2.04 KB

Local Deployment Guide

This guide will walk you through the steps to deploy and run the application on your pc with docker engine installed.

Prerequisites

  • Git: For cloning the repository
  • Docker: To manage containers
  • Docker Compose: To run multi-container applications
  • Bcrypt: For running the admin account creation script
  • python and bcrypt: For running the create_admin.sh script

Step 1: Clone the Repository

First, clone the project repository from GitHub to your pc. Navigate to the desired directory and run:

git clone https://github.com/ap-dev-github/swiftvault-smart-storage.git

Step 2: Configure Environment Variables Navigate into the cloned repository and create a .env file in the root directory:

cd swiftvault-smart-storage
touch .env

Open the .env file and add the following configuration:

POSTGRES_DB=filevault
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_secure_password
JWT_SECRET=your_jwt_secret

JWT_PRIVATE_KEY="your_private_key"
JWT_PUBLIC_KEY="your_public_key"

MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
MINIO_ENDPOINT=minio:9000
REDIS_HOST=redis
REDIS_PORT=6379

# --- Email Configuration ---
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=your_email@domain.com

# Frontend service related env
NODE_ENV=development
NEXT_BACKEND_SERVICE=http://localhost:8080
NEXT_PUBLIC_DOMAIN=http://localhost:3000

Note: Replace placeholder values with your actual credentials.

Step 3: Run the Application From the root directory, run Docker Compose to build and start all services:

docker-compose up --build

Step 4: Create an Admin Account Make the admin creation script executable:

chmod +x create_admin.sh

Run the script with your email and password:

./create_admin.sh "youremail@gmail.com" "your-password"

Step 5: Access the Application Access your application at port http://localhost:3000 Use the admin credential you just created for the admin role login and for the user login simply go and register at http://localhost:3000