# 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` environment variable 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 redis: image: redis:4.0-32bit restart: always volumes: - ./data/redis:/data ``` 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 `stop` and `up` it: ```sh docker-compose stop app 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_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_TEXTURES_UUIDS_PROVIDER_DRIVER |
Specifies the preferred provider of the Mojang's UUIDs. Takes remote value.
In any other case, the local queue will be used.
|
remote |
MOJANG_TEXTURES_UUIDS_PROVIDER_URL |
When the UUIDs driver set to remote , sets the remote URL.
The trailing slash won't cause any problems.
|
http://remote-provider.com/api/worker/mojang-uuid |
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! |