# Chrly [![Written in Go][ico-lang]][link-go] [![Build Status][ico-build]][link-build] [![Coverage][ico-coverage]][link-coverage] [![Keep a Changelog][ico-changelog]](CHANGELOG.md) [![Software License][ico-license]](LICENSE) Chrly is a lightweight implementation of Minecraft skins system server with ability to proxy requests to Mojang's skins system. It's packaged and distributed as a Docker image and can be downloaded from [Dockerhub](https://hub.docker.com/r/elyby/chrly/). App is written in Go, can withstand heavy loads and is production ready. ## Installation You can easily install Chrly using [docker-compose](https://docs.docker.com/compose/). The configuration below (save it as `docker-compose.yml`) can be used to start a Chrly server. It relies on `CHRLY_SECRET` and `CHRLY_SIGNING_KEY` environment variables that you must set before running `docker-compose up -d`. Other possible variables are described below. ```yml version: '2' services: app: image: elyby/chrly hostname: chrly0 restart: always links: - redis volumes: - ./data/capes:/data/capes ports: - "80:80" environment: CHRLY_SECRET: replace_this_value_in_production CHRLY_SIGNING_KEY: base64:LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlCT3dJQkFBSkJBTmJVcFZDWmtNS3BmdllaMDhXM2x1bWRBYVl4TEJubVVEbHpIQlFIM0RwWWVmNVdDTzMyClREVTZmZUlKNThBMGxBeXdndFo0d3dpMmRHSE96LzFoQXZjQ0F3RUFBUUpBSXRheFNIVGU2UEtieUVVLzlweGoKT05kaFlSWXdWTExvNTZnbk1ZaGt5b0VxYWFNc2ZvdjhoaG9lcGtZWkJNdlpGQjJiRE9zUTJTYUorRTJlaUJPNApBUUloQVBzc1MwK0JSOXcwYk9kbWpHcW1kRTlOck41VUpRY09XMTNzMjkrNlF6VUJBaUVBMnZXT2VwQTVBcGl1CnBFQTNwd29HZGtWQ3JOU25uS2pEUXpEWEJucGQzL2NDSUVGTmQ5c1k0cVVHNEZXZFhONlJubVhMN1NqMHVaZkgKRE13enU4ckVNNXNCQWlFQWh2ZG9ETnFMbWJNZHEzYytGc1BTT2VMMWQyMVpwL0pLOGtiUHRGbUhOZjhDSVFEVgo2RlNaRHd2V2Z1eGFNN0JzeWNRT05rakRCVFBOdStscWN0SkJHbkJ2M0E9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= redis: image: redis:4.0-32bit restart: always volumes: - ./data/redis:/data ``` **Tip**: to generate a value for the `CHRLY_SIGNING_KEY` use the command below and then join it with a `base64:` prefix. ```sh openssl genrsa 4096 | base64 -w0 ``` Chrly uses some volumes to persist storage for capes and Redis database. The configuration above mounts them to the host machine to do not lose data on container recreations. ### Config Application's configuration is based on the environment variables. You can adjust config by modifying `environment` key inside your `docker-compose.yml` file. After value will have been changed, container should be stopped and recreated. If environment variables have been changed, Docker will automatically recreate the container, so you only need to `up` it again: ```sh docker-compose up -d app ``` **Variables to adjust:**
ENV | Description | Example |
---|---|---|
STORAGE_REDIS_HOST |
By default, Chrly tries to connect to the redis host
(by service name in docker-compose configuration).
|
localhost |
STORAGE_REDIS_PORT | Specifies the Redis connection port. | 6379 |
STORAGE_REDIS_POOL | By default, Chrly creates pool with 10 connection, but you may want to increase it | 20 |
STATSD_ADDR | StatsD can be used to collect metrics | localhost:8125 |
SENTRY_DSN | Sentry can be used to collect app errors | https://public:private@your.sentry.io/1 |
QUEUE_STRATEGY |
Sets the strategy for the queue in the batch provider of Mojang UUIDs. Allowed values are periodic
and full-bus (see #24).
|
periodic |
QUEUE_LOOP_DELAY | Parameter is sets the delay before each iteration of the Mojang's textures queue (Go's duration) | 3s200ms |
QUEUE_BATCH_SIZE |
Sets the count of usernames, which will be sent to the
Mojang's API to exchange them to their UUIDs.
The current limit is 10 , but it may change in the future, so you may want to adjust it.
|
10 |
MOJANG_TEXTURES_ENABLED | Allows to completely disable Mojang textures provider for unknown usernames. Enabled by default. | true |
MOJANG_API_BASE_URL | Allows you to spoof the Mojang's API server address. | https://api.mojang.com |
MOJANG_SESSION_SERVER_BASE_URL | Allows you to spoof the Mojang's Session server address. | https://sessionserver.mojang.com |
TEXTURES_EXTRA_PARAM_NAME | Sets the name of the extra property in the signed textures response. | your-name |
TEXTURES_EXTRA_PARAM_VALUE | Sets the value of the extra property in the signed textures response. | your awesome joke! |