No description
Find a file
Timothy Rogers bdcc6c531b
All checks were successful
Build and Publish Docker Image / build (push) Successful in 41s
Addressing feature request for Content-Disposition
2025-05-26 14:38:13 -04:00
.forgejo use host 2025-05-24 12:04:15 -04:00
migrations Major rework, breaking migrations starting over 2025-05-24 10:38:21 -04:00
repo-images Adding screenshots 2025-05-24 20:43:35 -04:00
static/css add code 2024-11-10 16:01:57 -05:00
templates Addressing feature request for Content-Disposition 2025-05-26 14:38:13 -04:00
.dockerignore fixing docker-ignore 2025-05-25 07:38:58 -04:00
.env.example Added spinner and fixed asset delete bug 2025-05-24 19:01:29 -04:00
.gitignore gitignore updates 2025-05-24 10:39:48 -04:00
app.py Addressing feature request for Content-Disposition 2025-05-26 14:38:13 -04:00
config.py Added spinner and fixed asset delete bug 2025-05-24 19:01:29 -04:00
Dockerfile Fixing issues with env 2025-05-24 14:04:51 -04:00
entrypoint.sh preparing for public release 2025-05-24 17:09:58 -04:00
extensions.py add code 2024-11-10 16:01:57 -05:00
image_processor.py Decided to keep python based, added S3 support 2025-05-24 10:39:31 -04:00
models.py Decided to keep python based, added S3 support 2025-05-24 10:39:31 -04:00
package.json Convert Flask app to Next.js 2025-05-08 17:53:39 -04:00
README.md use html embed instead of md 2025-05-24 20:48:49 -04:00
requirements.txt Decided to keep python based, added S3 support 2025-05-24 10:39:31 -04:00
storage.py Addressing feature request for Content-Disposition 2025-05-26 14:38:13 -04:00

Assets Site

A digital asset management system built with Flask and S3-compatible storage.

Features

  • Digital asset management with metadata
  • S3-compatible storage backend (works with MinIO, public buckets only atm)
  • Automatic WebP conversion for images
  • License key management
  • Docker container support

Screenshots

Home Page

Asset View

Edit Page

Container Registry

This project includes automated container builds using Forgejo CI/CD. The container images are published to the project's container registry.

Using the Container Image

To pull the latest image:

docker pull git.hack13.dev/hack13/personal-digital-asset-manager:latest

For a specific version:

docker pull git.hack13.dev/hack13/personal-digital-asset-manager:v1.0.0

CI/CD Setup

The project uses Forgejo CI/CD to automatically build and publish container images. To set up the CI/CD pipeline:

  1. Configure the following variables in your Forgejo repository settings (Settings > Variables):

    • FORGEJO_REGISTRY: Your Forgejo registry URL (e.g., forgejo.yourdomain.com)
    • FORGEJO_OWNER: Your Forgejo username or organization name
    • FORGEJO_USER: Username for registry authentication
  2. Add the following secret in your Forgejo repository settings (Settings > Secrets):

    • FORGEJO_TOKEN: Access token for Forgejo registry authentication
  3. Enable Forgejo Actions in your repository settings

Container Tags

The following tags are automatically generated:

  • latest: Latest build from the main branch
  • v*: Release tags (e.g., v1.0.0)
  • sha-*: Build for specific commit

Development

Local Setup

  1. Clone the repository
  2. Create and activate a virtual environment
  3. Install dependencies: pip install -r requirements.txt
  4. Set up environment variables (see .env.example)
  5. Run migrations: flask db upgrade
  6. Start the server: flask run

Database Migrations

This project uses Flask-Migrate (Alembic) for database migrations. The migrations folder is version controlled and should be included in your commits.

Working with Migrations

  1. Create a new migration after model changes:

    flask db migrate -m "Description of changes"
    
  2. Review the generated migration in migrations/versions/

  3. Apply migrations:

    flask db upgrade
    
  4. Rollback migrations:

    flask db downgrade
    

First-time Setup

When cloning the repository:

  1. Initialize the database: flask db upgrade
  2. This will apply all existing migrations in order

Docker Development

Build the container:

docker build -t personal-digital-asset-manager .

Run the container:

docker run -p 5000:5000 \
  -v $(pwd)/static/uploads:/app/static/uploads \
  personal-digital-asset-manager