Skip to content
Use docker to package official version Unlight server
Ruby Shell Makefile HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets @ 0ec2d2f Initialize Project Aug 8, 2019
bin Fix typo Aug 9, 2019
customize Update README Aug 9, 2019
db Allow customize database Aug 9, 2019
dist Update README Aug 9, 2019
fonts Update README Aug 9, 2019
patches Fix tweener not correct enabled spacial behavior Aug 21, 2019
rework Update as3crypto.swc Aug 12, 2019
src @ 015d92e Update source code to latest commit Aug 15, 2019
templates Allow add custom docker compose config Aug 9, 2019
.dockerignore Add customize content support Aug 10, 2019
.gitignore Update README Aug 10, 2019
.gitmodules Initialize Project Aug 8, 2019
Dockerfile-client Fix dialog tweener Aug 21, 2019
LICENSE Initialize Project Aug 8, 2019
Makefile Update Makefile Aug 15, 2019 Update README Aug 10, 2019 Update README Aug 10, 2019
compile.env.example Rebuild client compile task Aug 9, 2019
docker-compose.external.yml Allow customize database Aug 9, 2019
docker-compose.yml Add customize content support Aug 10, 2019
server.env.example Update README Aug 9, 2019

Legacy Unlight Docker

The CPA is released Unlight's source code but there is no any document and stable version for setup. This repository provides a pre-package docker image for compile client (SWF) and server (Ruby) and lets anyone can serve their Unlight server.


  • Docker 19.03+
  • Docker Compose 1.24+
  • git 2+
  • make
  • Ruby 2.6+


For compile client or serve a game server, you need to download this repository to your local machine or server.

git clone
cd legacy-unlight-docker
# Download offical source code and assets
git submodule init
git submodule update --recursive



The fonts are included in Unlight.swf, you have to download the font file and put it into fonts/ directory.

Language Required Fonts
Traditional Chinese cwming.ttf (cwTeXMing 明體), wt004.ttf (王漢宗特明體), nbr.ttf

nbr.ttf is Bradley Gratis but with customize.

Next, you need to configure compile.env to define the preferences you want.

# Copy example file and modify
cp compile.env.example compile.env

Then you can compile Unlight.swf via Docker.

make client

More customize options will add soon


To setup server, you need build server docker image in first run.

Before start, we need to setup server config.

cp server.env.example server.env

If you host the database and Memcached in another server, please update the config.

make setup

This command will build a docker image and initialize load database.

After the server is ready, we can start all servers

make start

After servers are ready, we have to set up static files.

bin/prepare-assets --t_chinese -P dist/

The dist/ directory is your web server root folder includes Unlight's public/ directory. This will change SWF to your locale.

Customize Docker

The Docker Compose's scale feature will break our services, please add your external server to docker-compose.custom.yml

version: '3.4'
x-image: &image
  image: unlight-server
    - server.env
  restart: unless-stopped
    <<: *image
    command: server lobby 12002
      - '12003:12002'

And run make start to start the new server.

Customize MySQL

If you plan to use Docker to run your database server and want to change something, add your .cnf to db/conf.d and restart the database.

; my.cnf
init_connect='SET NAMES utf8mb4'



And run bin/unlight restart db to restart your database server.

Unlight Command

This project use shared docker-compose.yml, please use bin/unlight to replace with docker-compose otherwise you will lose config.

You can’t perform that action at this time.