跳到內容

Configure your environment

本頁內容尚未翻譯。

準備好……

  • Set up your PostgreSQL database
  • Configure S3-compatible storage
  • Set environment variables

Before running Paideia LMS, you need to set up your database and storage, and configure environment variables.

  1. Make sure PostgreSQL is running and accessible. If you’re using Docker Compose, PostgreSQL will be included.

  2. Create a database for Paideia LMS:

    Terminal window
    createdb paideia_db

    Or if you’re using a remote database, create it through your database management tool.

  1. Set up MinIO or another S3-compatible storage service. If you’re using Docker Compose, MinIO will be included.

    For local MinIO setup, you can use Docker:

    Terminal window
    docker run -d \
    -p 9000:9000 \
    -p 9001:9001 \
    -e MINIO_ROOT_USER=paideia_minio \
    -e MINIO_ROOT_PASSWORD=paideia_minio_secret \
    minio/minio server /data --console-address ":9001"
  2. Create a bucket for Paideia LMS. Access MinIO console at http://localhost:9001 and create a bucket named paideia-bucket.

  1. Set environment variables before running Paideia LMS:

    Terminal window
    export DATABASE_URL="postgresql://user:password@localhost:5432/paideia_db"
    export S3_URL="http://localhost:9000"
    export S3_ACCESS_KEY="paideia_minio"
    export S3_SECRET_KEY="paideia_minio_secret"
    export S3_BUCKET="paideia-bucket"
    export PAYLOAD_SECRET="your-secure-random-string-here"
  2. Optionally, you can create a .env file in the same directory as the binary:

    Terminal window
    cat > .env << EOF
    DATABASE_URL=postgresql://user:password@localhost:5432/paideia_db
    S3_URL=http://localhost:9000
    S3_ACCESS_KEY=paideia_minio
    S3_SECRET_KEY=paideia_minio_secret
    S3_BUCKET=paideia-bucket
    PAYLOAD_SECRET=your-secure-random-string-here
    EOF

Congratulations! Your environment is now configured and ready to run Paideia LMS!

Ask DeepWiki
貢獻 社群 贊助