Giter VIP home page Giter VIP logo

mcarchive's Introduction

MCArchive logo

MCArchive

This is a website where old (and new) Minecraft mods can be hosted and preserved for future generations.

Running

To set up a development environment for the website, you'll need Python 3, pip, and yarn for the frontend assets.

It is recommended to install pip-tools (pip install pip-tools) in your virtualenv if you're going to be contributing. This will allow you to use pip-sync to keep your dependencies in sync with the requirements.

Before you run any flask commands, set the following environment variables. You can add this to the end of bin/activate in your virtualenv to have it set for you when you activate your environment.

export FLASK_APP=mcarch
export FLASK_ENV=development
export MCARCH_CONFIG=dev_config.py

Copy config.py.example to dev_config.py and edit it to configure your database (PostgreSQL is used in production and recommended for development), Redis, and B2 bucket. If you're not uploading files, you can exclude the B2 API keys and bucket name and use MCArchive's official B2 public URL: https://b2.mcarchive.net/file/mcarchive/.

Now you can install dependencies and build the assets.

  1. Run yarn to install the frontend dependencies.
  2. Run yarn run webpack to build frontend assets. If you want to make changes to them, you can run yarn run webpack --watch to auto-rebuild them.
  3. Run pip-sync if you're using pip-tools, or just pip install -r requirements.txt otherwise.
  4. Run flask db upgrade to create the database.

To create an admin user for yourself, run flask adduser <name> <email> admin.

To import metadata from the old archive format, you can run flask import /path/to/metadata, where the path is a folder containing metadata files for the old archive. The script assumes all the files in the imported metadata are already stored on Backblaze B2, and will add them to the database as such.

When you're done setting up, you can start the development server with flask run.

mcarchive's People

Contributors

forkk avatar scotsguy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.