mirror of
https://github.com/Gurkengewuerz/nitro-docker.git
synced 2024-11-30 03:20:50 +01:00
updated to nitro dev and arcturus ms4/dev
This commit is contained in:
parent
e5f26b0d21
commit
6ed8353566
33
README.md
33
README.md
@ -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).
|
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.
|
The default configuration can run on localhost.
|
||||||
|
|
||||||
|
**This Repository uses `ms4/dev` branch!**
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- Install docker desktop (and for windows, enable WSL support) [from here](https://www.docker.com/get-started/).
|
- Install docker desktop (and for windows, enable WSL support) [from here](https://www.docker.com/get-started/).
|
||||||
- Clone this repository
|
- Clone this repository
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
1. Clone default SWF pack
|
1. Download default assets
|
||||||
```bash
|
```bash
|
||||||
# download SWFs
|
# download SWFs
|
||||||
git clone https://git.krews.org/morningstar/arcturus-morningstar-default-swf-pack.git assets/swf/
|
git clone https://git.krews.org/morningstar/arcturus-morningstar-default-swf-pack.git assets/swf/
|
||||||
```
|
|
||||||
|
|
||||||
2. Download default assets
|
|
||||||
```bash
|
|
||||||
# download assets
|
# download assets
|
||||||
git clone https://github.com/krewsarchive/default-assets.git assets/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** ⚠
|
⚠ **The database port is exposed to `3010` by default** ⚠
|
||||||
```bash
|
```bash
|
||||||
# start database
|
# start database
|
||||||
docker compose up db -d
|
docker compose up db -d
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Manually initialize database
|
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/master/sqlupdates).
|
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
|
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.
|
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
|
```sql
|
||||||
-- update value path to the assets server
|
-- 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';
|
UPDATE emulator_settings SET `value`='0' WHERE `key`='console.mode';
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Start Asset Server
|
6. Start Asset Server
|
||||||
```bash
|
```bash
|
||||||
# start asset server
|
# start asset server
|
||||||
docker compose up assets -d
|
docker compose up assets -d
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Build assets locally
|
7. Build assets locally
|
||||||
```bash
|
```bash
|
||||||
# build the nitro assets
|
# build the nitro assets
|
||||||
docker compose up assets-build
|
docker compose up assets-build
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Build and Start Arcturus Community Emulator
|
8. Build and Start Arcturus Community Emulator
|
||||||
```bash
|
```bash
|
||||||
# start Arcturus emulator
|
# start Arcturus emulator
|
||||||
docker compose up arcturus
|
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
|
```bash
|
||||||
# start nitro server
|
# start nitro server
|
||||||
docker compose up nitro
|
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 to latest production
|
||||||
Update a few assets since we want the most up to date assets as possible.
|
Update a few assets since we want the most up to date assets as possible.
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
FROM maven:3-amazoncorretto-8 AS builder
|
FROM maven:3-amazoncorretto-8 AS builder-ms3
|
||||||
|
|
||||||
ARG BRANCH=dev
|
|
||||||
|
|
||||||
RUN yum install -y git
|
RUN yum install -y git
|
||||||
|
|
||||||
WORKDIR /build/arcturus-community
|
WORKDIR /build/arcturus-community
|
||||||
RUN git clone --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
|
RUN git clone --branch dev --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
|
||||||
RUN git checkout -b ${BRANCH}
|
|
||||||
RUN mvn package
|
RUN mvn package
|
||||||
RUN mvn install
|
RUN mvn install
|
||||||
RUN cp target/*-jar-with-dependencies.jar target/emulator.jar
|
|
||||||
|
|
||||||
WORKDIR /build/arcturus-ws
|
WORKDIR /build/arcturus-ws
|
||||||
RUN git clone --recurse-submodules https://git.krews.org/nitro/ms-websockets.git .
|
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 mvn package
|
||||||
RUN cp target/Apollyon-*.jar target/apollyon.jar
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache mariadb-client bash
|
RUN apk add --no-cache mariadb-client bash
|
||||||
|
|
||||||
COPY --from=builder /build/arcturus-community/sqlupdates /app/sqlupdates
|
COPY --from=builder-ms4 /build/arcturus-community/target/emulator.jar /app/emulator.jar
|
||||||
COPY --from=builder /build/arcturus-community/target/emulator.jar /app/emulator.jar
|
|
||||||
RUN mkdir -p /app/plugins
|
RUN mkdir -p /app/plugins
|
||||||
COPY --from=builder /build/arcturus-ws/target/websockets.jar /app/plugins/websockets.jar
|
COPY --from=builder-ms3 /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/apollyon/target/apollyon.jar /app//plugins/apollyon.jar
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/java", "-jar", "/app/emulator.jar"]
|
ENTRYPOINT ["/usr/bin/java", "-jar", "/app/emulator.jar"]
|
@ -4,8 +4,6 @@ services:
|
|||||||
arcturus:
|
arcturus:
|
||||||
build:
|
build:
|
||||||
context: arcturus
|
context: arcturus
|
||||||
args:
|
|
||||||
BRANCH: dev
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
@ -22,8 +20,6 @@ services:
|
|||||||
nitro:
|
nitro:
|
||||||
build:
|
build:
|
||||||
context: nitro
|
context: nitro
|
||||||
args:
|
|
||||||
BRANCH: dev
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -5,8 +5,7 @@ ARG BRANCH=dev
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN apk add --no-cache git
|
RUN apk add --no-cache git
|
||||||
RUN git clone --recurse-submodules https://github.com/billsonnn/nitro-react.git .
|
RUN git clone --branch ${BRANCH} --recurse-submodules https://github.com/billsonnn/nitro-react.git .
|
||||||
RUN git checkout -b ${BRANCH}
|
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
@ -14,4 +13,4 @@ RUN yarn build
|
|||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
COPY --from=builder /build/build/ /usr/share/nginx/html/
|
COPY --from=builder /build/dist/ /usr/share/nginx/html/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"image.library.notifications.url": "${image.library.url}notifications/%image%.png",
|
"image.library.notifications.url": "${image.library.url}notifications/%image%.png",
|
||||||
"achievements.images.url": "${image.library.url}Quests/%image%.png",
|
"achievements.images.url": "${image.library.url}Quests/%image%.png",
|
||||||
"camera.url": "http://127.0.0.1:8080/usercontent/camera",
|
"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",
|
"url.prefix": "https://website.com",
|
||||||
"habbopages.url": "${url.prefix}/",
|
"habbopages.url": "${url.prefix}/",
|
||||||
"group.homepage.url": "${url.prefix}/groups/%groupid%/id",
|
"group.homepage.url": "${url.prefix}/groups/%groupid%/id",
|
||||||
|
Loading…
Reference in New Issue
Block a user