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+
- 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 https://github.com/open-unlight/legacy-unlight-docker.git 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
|Traditional Chinese||cwming.ttf (cwTeXMing 明體), wt004.ttf (王漢宗特明體), nbr.ttf|
Bradley Gratisbut 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.
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.
This command will build a docker image and initialize load database.
After the server is ready, we can start all servers
After servers are ready, we have to set up static files.
bin/prepare-assets --t_chinese -P dist/
dist/directory is your web server root folder includes Unlight's
public/directory. This will change SWF to your locale.
We also provide pre-build image and allow you setup server without build it by yourself.
x-image: &image image: openunlight/legacy-server:latest # Change this line env_file: - server.env restart: unless-stopped depends_on: - memcached - db
The Docker Compose's scale feature will break our services, please add your external server to
version: '3.4' x-image: &image image: unlight-server env_file: - server.env restart: unless-stopped lobby2_server: <<: *image command: server lobby 12002 ports: - '12003:12002'
make start to start the new server.
If you plan to use Docker to run your database server and want to change something, add your
db/conf.d and restart the database.
; my.cnf [mysqld] character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci init_connect='SET NAMES utf8mb4' [client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4
bin/unlight restart db to restart your database server.
This project use shared docker-compose.yml, please use
bin/unlight to replace with
docker-compose otherwise you will lose config.