---
# System prepended metadata

title: Rozbehanie servera

---

# Rozbehanie servera

- winpty docker login registry.gitlab.com
- Login z gitlabu
- docker pull registry.gitlab.com/fiit/common/ci-images/legion:v1
- vytvorenie si priecinka pre projekt
- vytvorenie si priecinka devenv
- git checkout feature/berith_luaserver_lualegion_interaction
-- git clone https://gitlab.com/FIIT/Common/devenv.git .
-- git submodule update --init --remote (To zrejme nepojde, bude treba pridat ssh kluc)

## Pridanie ssh kluca

- ssh-keygen -t ed25519
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/id_ed25519
- cat ~/.ssh/id_ed25519.pub | clip
- git submodule update --init --remote (Teraz by to uz malo fungovat)

**Otvorime si 3 terminaly** 
- **1. terminal** - `docker compose up` -> ale ten subor so skip - mozme vymazat ten povodny a ten skip premenovat, alebo tam to pojde spustit aj s nejakym flagom zrejme, asi -f. Ten nechame spusteny, lebo bez neho nepojde regent
- **2. terminal** - tu spustime regent, ideme do devenvu a pustime `winpty docker exec -it devenv-lualegion-1 bash`. Potom spustime `../legion/language/regent.py app.rg`.
- **3. terminal** - `winpty docker exec -it 5de0985ad76e bash`. To ID containera bude ine, berieme to pre lua-u. Potom na serveri pustime `lua ./src/LuaScripts/app/main.lua` z adresara luaserver.

**Unity strana**
- API_out.LoadGraph("FruchtermanReingoldNew");
- // TODO docasne riesenie
            if (Time.time >= lastUpdateSeconds + 5f)
            {
                lastUpdateSeconds = Time.time;
                API_out.UpdateNodes();
                API_out.GetNodePositionColumn();
            } -> Toto zakomentovat****