Requirements:
- Docker with docker compose plugin
- Clone the git repository
git clone https://github.com/W-Lands/api
- Rename example config
mv .env.example .env
- Change config variables
- Generate 4096-bit RSA keypair in keys directory
- Run:
docker compose up
- Log in into minio admin panel and change wlands-updates bucket policy to:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {"AWS": ["*"]},
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::wlands-updates/*"]
}]
}
OR
set SET_UPDATES_BUCKET_POLICY
environment variable to 1
, it will set bucket policy automatically on startup.
Requirements:
- Python 3.11+
- Poetry
- Clone the git repository
git clone https://github.com/W-Lands/api
- Install dependencies:
poetry install
- Set the following environment variables:
DATABASE_URL
- Database connection string, for example:mysql://username:password@127.0.0.1/wlands
S3_ENDPOINT
- S3 endpoint, for example:http://127.0.0.1:9000
S3_ACCESS_KEY_ID
- S3 access keyS3_SECRET_ACCESS_KEY
- S3 secret key
Optional variables:SET_UPDATES_BUCKET_POLICY
- set to1
to enable automatic updates bucket policy changing.
- Generate 4096-bit RSA keypair in keys directory
- Run:
poetry run uvicorn --workers 4 --host 127.0.0.1 --port 8080 wlands.main:app