Giter Site home page Giter Site logo

leeworld's Introduction

Leeworld

Build

docker build -t orjans/leeworld:hub --target hub .
docker run -it --rm orjans/leeworld:hub > Unity.alf

Upload the Unity.alf file to https://license.unity3d.com/manual and get the .ulf file and save it as Unity_lic.ulf

docker build -t orjans/leeworld:amd .

ARM64

Download arm.Dockerfile to build an ARM version of the image. Replace latest with the desired version of leeworld

docker build -f arm.Dockerfile --build-arg TAG=amd -t orjans/leeworld:arm .
docker push orjans/leeworld:arm

Push the arm image to the same tag by using manifest

docker manifest create orjans/leeworld:latest orjans/leeworld:amd orjans/leeworld:arm
docker manifest push orjans/leeworld:latest

Setup database

touch db.sqlite3
docker run \
    -it \
    --rm \
    -v $(pwd)/db.sqlite3:/app/db.sqlite3 \
    --entrypoint ./manage.py \
orjans/leeworld migrate
docker run \
    -it \
    --rm \
    -v $(pwd)/db.sqlite3:/app/db.sqlite3 \
    --entrypoint ./manage.py \
orjans/leeworld createsuperuser

Host

Create a file named production_settings.py

    # production_settings.py
    from .settings import *
    SECRET_KEY = "with-a-random-secret-key-123*"
    DEBUG = False
    STATIC_ROOT = '/var/www/static/'

Create ssl certificate

openssl req -newkey rsa:4096  -x509  -sha512  -days 365 -nodes -out crt.pem -keyout key.pem

If using certbot on oracle, you might want to run the following command:

sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo netfilter-persistent save

Run the server

docker run \
    -it \
    -p 4430:443 \
    -v $(pwd)/db.sqlite3:/app/db.sqlite3 \
    -v $(pwd)/production_settings.py:/app/LeeworldServer/production_settings.py \
        -e DJANGO_SETTINGS_MODULE=LeeworldServer.production_settings \
    -v $(pwd)/crt.pem:/app/crt.pem -v $(pwd)/key.pem:/app/key.pem \
orjans/leeworld -e ssl:443:privateKey=key.pem:certKey=crt.pem

Visit https://localhost:4430/admin to register players

leeworld's People

Contributors

orsolli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.