updated to nitro dev and arcturus ms4/dev

This commit is contained in:
Niklas 2023-03-13 21:17:29 +01:00
parent e5f26b0d21
commit 6ed8353566
6 changed files with 45 additions and 37 deletions

View File

@ -2,38 +2,39 @@
Nitro docker is a quick-to-setup docker environment for the [nitro client](https://github.com/billsonnn/nitro-react) with [Arcturus Community Emulator](https://git.krews.org/morningstar/Arcturus-Community). It can be run on Windows, Linux or OSX just with a few commands. It is inspired by [Holo5/nitro-docker](https://github.com/Holo5/nitro-docker).
The default configuration can run on localhost.
**This Repository uses `ms4/dev` branch!**
## Requirements
- Install docker desktop (and for windows, enable WSL support) [from here](https://www.docker.com/get-started/).
- Clone this repository
## Build
1. Clone default SWF pack
1. Download default assets
```bash
# download SWFs
git clone https://git.krews.org/morningstar/arcturus-morningstar-default-swf-pack.git assets/swf/
```
2. Download default assets
```bash
# download assets
git clone https://github.com/krewsarchive/default-assets.git assets/assets/
# WEE WOO WEE WOO DO NOT FORGET THIS!
wget https://github.com/billsonnn/nitro-react/files/10334858/room.nitro.zip
unzip room.nitro.zip -d assets/assets/bundled/generic
```
3. Take a look at `.env` file an configure to your needs
2. Take a look at `.env` file an configure to your needs
4. Start database
3. Start database
**The database port is exposed to `3010` by default**
```bash
# start database
docker compose up db -d
```
5. Manually initialize database
Setup using `arcturus/arcturus_3.0.0-stable_base_database--compact.sql` and the correct SQL Updates from [Arcturus sqlupdates](https://git.krews.org/morningstar/Arcturus-Community/-/tree/master/sqlupdates).
4. Manually initialize database
Setup using `arcturus/arcturus_3.0.0-stable_base_database--compact.sql` and the correct SQL Updates from [Arcturus sqlupdates](https://git.krews.org/morningstar/Arcturus-Community/-/tree/ms4/dev/sqlupdates).
The first database come from mysql/dumps, it's the base Arcturus database for 3.0.X with just a default SSO ticket (123) useable via http://127.0.0.1:1080?sso=123
6. Update emulator settings
5. Update emulator settings
Disable console mode for Arcturus because we are using docker. To update the arcturus database preferably use rcon. To update a `user_` table disconnect the user. To update the `emulator_settings` table stop the server.
```sql
-- update value path to the assets server
@ -43,33 +44,33 @@ UPDATE emulator_settings SET `value`='/app/assets/usercontent/camera/' WHERE `k
UPDATE emulator_settings SET `value`='0' WHERE `key`='console.mode';
```
7. Start Asset Server
6. Start Asset Server
```bash
# start asset server
docker compose up assets -d
```
8. Build assets locally
7. Build assets locally
```bash
# build the nitro assets
docker compose up assets-build
```
9. Build and Start Arcturus Community Emulator
8. Build and Start Arcturus Community Emulator
```bash
# start Arcturus emulator
docker compose up arcturus
```
10. Update `nitro/renderer-config.json` and `nitro/ui-config.json` values to your setup. If the deployment is buggy or throws any errors check the json files for updates.
9. Update `nitro/renderer-config.json` and `nitro/ui-config.json` values to your setup. If the deployment is buggy or throws any errors check the json files for updates.
11. Build and Start Nitro
10. Build and Start Nitro
```bash
# start nitro server
docker compose up nitro
```
Next setup reverse proxies for your nginx or traefik server.
Next setup reverse proxies for your nginx or traefik server. You should disable proxy side caching.
## Update to latest production
Update a few assets since we want the most up to date assets as possible.

View File

@ -1,15 +1,11 @@
FROM maven:3-amazoncorretto-8 AS builder
ARG BRANCH=dev
FROM maven:3-amazoncorretto-8 AS builder-ms3
RUN yum install -y git
WORKDIR /build/arcturus-community
RUN git clone --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
RUN git checkout -b ${BRANCH}
RUN git clone --branch dev --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
RUN mvn package
RUN mvn install
RUN cp target/*-jar-with-dependencies.jar target/emulator.jar
WORKDIR /build/arcturus-ws
RUN git clone --recurse-submodules https://git.krews.org/nitro/ms-websockets.git .
@ -24,16 +20,32 @@ RUN sed -i 's#<version>3.0.0</version>#<version>[1.0.0,)</version>#g' pom.xml
RUN mvn package
RUN cp target/Apollyon-*.jar target/apollyon.jar
FROM amazoncorretto:8-alpine-jre
FROM maven:3-amazoncorretto-19 AS builder-ms4
ARG BRANCH=ms4/dev
RUN yum install -y git
WORKDIR /build/arcturus-community
RUN git clone --branch ${BRANCH} --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
RUN sed -i 's#Scanner scanner = new Scanner(System.in);##g' src/main/java/com/eu/habbo/Emulator.java
RUN sed -i 's#scanner.nextLine();##g' src/main/java/com/eu/habbo/Emulator.java
RUN mvn package
RUN cp target/Morningstar*-with-dependencies.jar target/emulator.jar
FROM amazoncorretto:19-alpine
WORKDIR /app
RUN apk add --no-cache mariadb-client bash
COPY --from=builder /build/arcturus-community/sqlupdates /app/sqlupdates
COPY --from=builder /build/arcturus-community/target/emulator.jar /app/emulator.jar
COPY --from=builder-ms4 /build/arcturus-community/target/emulator.jar /app/emulator.jar
RUN mkdir -p /app/plugins
COPY --from=builder /build/arcturus-ws/target/websockets.jar /app/plugins/websockets.jar
COPY --from=builder /build/apollyon/target/apollyon.jar /app//plugins/apollyon.jar
COPY --from=builder-ms3 /build/arcturus-ws/target/websockets.jar /app/plugins/websockets.jar
COPY --from=builder-ms3 /build/apollyon/target/apollyon.jar /app//plugins/apollyon.jar
ENTRYPOINT ["/usr/bin/java", "-jar", "/app/emulator.jar"]

View File

@ -4,8 +4,6 @@ services:
arcturus:
build:
context: arcturus
args:
BRANCH: dev
env_file:
- .env
volumes:
@ -22,8 +20,6 @@ services:
nitro:
build:
context: nitro
args:
BRANCH: dev
env_file:
- .env
volumes:

View File

@ -5,8 +5,7 @@ ARG BRANCH=dev
WORKDIR /build
RUN apk add --no-cache git
RUN git clone --recurse-submodules https://github.com/billsonnn/nitro-react.git .
RUN git checkout -b ${BRANCH}
RUN git clone --branch ${BRANCH} --recurse-submodules https://github.com/billsonnn/nitro-react.git .
RUN yarn install
RUN yarn build
@ -14,4 +13,4 @@ RUN yarn build
FROM nginx:alpine
COPY --from=builder /build/build/ /usr/share/nginx/html/
COPY --from=builder /build/dist/ /usr/share/nginx/html/

View File

@ -105,4 +105,4 @@
"${images.url}/clear_icon.png",
"${images.url}/big_arrow.png"
]
}
}

View File

@ -2,7 +2,7 @@
"image.library.notifications.url": "${image.library.url}notifications/%image%.png",
"achievements.images.url": "${image.library.url}Quests/%image%.png",
"camera.url": "http://127.0.0.1:8080/usercontent/camera",
"thumbnails.url": "${thumbnails.url}",
"thumbnails.url": "https://camera.url/thumbnail/%thumbnail%.png",
"url.prefix": "https://website.com",
"habbopages.url": "${url.prefix}/",
"group.homepage.url": "${url.prefix}/groups/%groupid%/id",
@ -1195,4 +1195,4 @@
"image": "${image.library.url}/album1584/X1517.gif"
}
}
}
}