Configure your environment
本頁內容尚未翻譯。
準備好……
- Set up your PostgreSQL database
- Configure S3-compatible storage
- Set environment variables
Configure your environment
Section titled “Configure your environment”Before running Paideia LMS, you need to set up your database and storage, and configure environment variables.
Set up PostgreSQL
Section titled “Set up PostgreSQL”-
Make sure PostgreSQL is running and accessible. If you’re using Docker Compose, PostgreSQL will be included.
-
Create a database for Paideia LMS:
Terminal window createdb paideia_dbOr if you’re using a remote database, create it through your database management tool.
Set up S3-Compatible Storage
Section titled “Set up S3-Compatible Storage”-
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" -
Create a bucket for Paideia LMS. Access MinIO console at
http://localhost:9001and create a bucket namedpaideia-bucket.
Configure Environment Variables
Section titled “Configure Environment Variables”-
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" -
Optionally, you can create a
.envfile in the same directory as the binary:Terminal window cat > .env << EOFDATABASE_URL=postgresql://user:password@localhost:5432/paideia_dbS3_URL=http://localhost:9000S3_ACCESS_KEY=paideia_minioS3_SECRET_KEY=paideia_minio_secretS3_BUCKET=paideia-bucketPAYLOAD_SECRET=your-secure-random-string-hereEOF
Congratulations! Your environment is now configured and ready to run Paideia LMS!
