https://github.com/knowvus/kerrigan
Postgres DB
https://github.com/knowvus/kerrigan
diesel kerrigan postgres
Last synced: 6 months ago
JSON representation
Postgres DB
- Host: GitHub
- URL: https://github.com/knowvus/kerrigan
- Owner: Knowvus
- License: gpl-3.0
- Created: 2024-08-21T02:08:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T00:52:55.000Z (almost 2 years ago)
- Last Synced: 2025-03-22T21:43:00.627Z (over 1 year ago)
- Topics: diesel, kerrigan, postgres
- Language: Rust
- Homepage:
- Size: 6.42 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Kerrigan - PostgreSQL Integration
## Table of Contents
- [Overview](#overview)
- [Deployment Status](#deployment-status)
- [Storage](#storage)
- [Credentials](#credentials)
- [Migrations](#migrations)
- [Containerization](#containerization)
- [Deployment](#deployment)
- [Project Setup](#project-setup)
- [CI/CD](#ci-cd)
- [Roadmap](#roadmap)
## Overview
This project integrates the Kerrigan PostgreSQL database with the Duke_rs server, now re-implemented in Rust. The project aims to set up user and task management with a Postgres database, managing migrations, and deploying to a DigitalOcean droplet.
## Deployment Status
[](https://github.com/Knowvus/Duke_rs/actions/workflows/deploy.yml)
## Roadmap
### Registration Process
- **Step 1:** User enters email address and clicks "Register"
- **Step 2:** Check for duplicate email
- **Step 3:** If email is not duplicate, create a new user
- **Step 4:** Send confirmation email with a link
- **Step 5:** User clicks the confirmation link and is registered
### Milestones
- [x] Create User Table in Postgres
- [x] Create Task Table in Postgres
- [ ] Implement User Registration Endpoint
- [ ] Implement Task Creation Endpoint
- [ ] Add Unit, Integration, and E2E testing
## Migrations
- **Migration Tool:** `diesel` with Rust
```
Samples
@ = %40
name@gmail.com = name%40gmail.com
export PG_USER=email@domain.com
export PG_PASSWORD=password
export PG_HOST=ip_address
export PG_PORT=port
export PG_DATABASE=db_name
export DATABASE_URL=postgres://$PG_USER:$PG_PASSWORD@$PG_HOST:$PG_PORT/$PG_DATABASE
diesel migration run
```
## Containerization & Deployment
- **Docker Container Name:** `kerrigan`
- **Container Name:** `kerrigan`
- **Hosting:** DigitalOcean Droplet
## Project Setup
### 1) Create GitHub Repository
- Initialize a new repository on GitHub for the project.
### 2) Create DigitalOcean Droplet
- Set up a new droplet on DigitalOcean and configure it to run the Rust application and Postgres database.
### 3) Store SSH Keys
- Store SSH keys on both the DigitalOcean Droplet and GitHub repository secrets for secure communication.
### 4) Initialize Rust Project
- Install Rust and Cargo on your development machine:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
- Create a new Rust project:
```bash
cargo new kerrigan_rs
cd kerrigan_rs
```