Skip to content

Commit f81c3e1

Browse files
committed
Initial commit for fork
0 parents  commit f81c3e1

151 files changed

Lines changed: 25428 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Forge Environment Variables
2+
#
3+
# This file provides a template for the environment variables needed to run the Forge application.
4+
# Copy this file to .env and fill in the appropriate values for your development environment.
5+
# Do not commit the .env file to your version control system.
6+
7+
# -----------------------------------------------------------------------------
8+
# DATABASE SETTINGS
9+
# -----------------------------------------------------------------------------
10+
# PostgreSQL connection string.
11+
# Example for local development with Docker: postgresql://forge:forge@localhost:5432/forge
12+
DATABASE_URL=postgresql://user:password@host:port/dbname
13+
14+
# -----------------------------------------------------------------------------
15+
# REDIS CACHE SETTINGS (Optional)
16+
# -----------------------------------------------------------------------------
17+
# URL for your Redis instance. If not provided, an in-memory cache will be used.
18+
# REDIS_URL=redis://localhost:6379/0
19+
# Prefix for all Redis keys to avoid collisions.
20+
REDIS_PREFIX=forge
21+
22+
# -----------------------------------------------------------------------------
23+
# SECURITY & AUTHENTICATION
24+
# -----------------------------------------------------------------------------
25+
# Secret key for signing JWTs. Generate a strong, random key.
26+
# Use `openssl rand -hex 32` to generate a key.
27+
SECRET_KEY=
28+
# Secret key for encrypting sensitive data like provider API keys.
29+
# Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
30+
ENCRYPTION_KEY=
31+
# Algorithm for JWT signing.
32+
ALGORITHM=HS256
33+
# Access token expiration time in minutes.
34+
ACCESS_TOKEN_EXPIRE_MINUTES=60
35+
36+
# -----------------------------------------------------------------------------
37+
# CLERK AUTHENTICATION INTEGRATION (OPTIONAL)
38+
# -----------------------------------------------------------------------------
39+
# Your Clerk JWT public key (remove -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- headers/footers and newlines).
40+
CLERK_JWT_PUBLIC_KEY=
41+
# Your Clerk API key.
42+
CLERK_API_KEY=
43+
# Your Clerk API URL.
44+
CLERK_API_URL=https://api.clerk.dev/v1
45+
# Your Clerk webhook signing secret.
46+
CLERK_WEBHOOK_SECRET=
47+
48+
# -----------------------------------------------------------------------------
49+
# APPLICATION & DEVELOPMENT SETTINGS
50+
# -----------------------------------------------------------------------------
51+
# Set to "production" or "development".
52+
ENVIRONMENT=development
53+
# Set to "true" to enable debug-level logging.
54+
FORGE_DEBUG_LOGGING=false
55+
# Host for the application.
56+
HOST=0.0.0.0
57+
# Port for the.
58+
PORT=8000
59+
# Set to "true" to enable auto-reloading for development.
60+
RELOAD=false
61+
# Number of Gunicorn worker processes.
62+
WORKERS=4
63+
# Set to "true" to force the use of in-memory cache, even if REDIS_URL is set.
64+
# Useful for testing environments.
65+
FORCE_MEMORY_CACHE=false
66+
# Set to "true" to enable verbose cache debugging output.
67+
DEBUG_CACHE=false
68+
# Your application's domain, used for JWT audience validation.
69+
APP_DOMAIN=localhost
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
<!-- Provide a brief description of the changes in this PR -->
3+
4+
## Type of Change
5+
<!-- Please delete options that are not relevant -->
6+
- [ ] Bug fix (non-breaking change which fixes an issue)
7+
- [ ] New feature (non-breaking change which adds functionality)
8+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] Documentation update
10+
- [ ] Refactoring (no functional changes)
11+
- [ ] Performance improvement
12+
- [ ] Testing improvement
13+
14+
## How Has This Been Tested?
15+
<!-- Please describe the tests that you ran to verify your changes -->
16+
- [ ] Unit tests
17+
- [ ] Integration tests
18+
- [ ] Manual tests (please describe)
19+
20+
## Checklist:
21+
<!-- Go over all the following points, and put an `x` in all the boxes that apply -->
22+
- [ ] My code follows the code style of this project
23+
- [ ] My changes generate no new warnings
24+
- [ ] I have added tests that prove my fix is effective or that my feature works
25+
- [ ] New and existing unit tests pass locally with my changes
26+
- [ ] Any dependent changes have been merged and published in downstream modules
27+
- [ ] I have updated the documentation accordingly
28+
- [ ] I have checked that my changes don't break backward compatibility
29+
- [ ] I have ensured all automated tests pass (checks are green)
30+
31+
## Additional Context
32+
<!-- Add any other context or screenshots about the pull request here -->

.github/workflows/docker-build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
description: 'Release Tag (leave empty for auto-generated timestamp)'
8+
required: false
9+
default: ''
10+
debug_logging:
11+
description: 'Enable debug logging in the image'
12+
type: boolean
13+
required: false
14+
default: false
15+
16+
jobs:
17+
build-and-publish:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
27+
- name: Login to Docker Hub
28+
uses: docker/login-action@v2
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_PASSWORD }}
32+
33+
- name: Get timestamp
34+
id: timestamp
35+
run: echo "timestamp=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
36+
37+
- name: Determine tag
38+
id: tag
39+
run: |
40+
if [ -z "${{ github.event.inputs.release_tag }}" ]; then
41+
echo "tag=${{ steps.timestamp.outputs.timestamp }}" >> $GITHUB_OUTPUT
42+
else
43+
echo "tag=${{ github.event.inputs.release_tag }}" >> $GITHUB_OUTPUT
44+
fi
45+
46+
- name: Build and push
47+
uses: docker/build-push-action@v4
48+
with:
49+
context: .
50+
push: true
51+
tags: |
52+
tensorblockai/forge:latest
53+
tensorblockai/forge:${{ steps.tag.outputs.tag }}
54+
cache-from: type=gha
55+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)