Holo5 / nitro-docker

Create your own Habbo Retro with Docker and 2 commands ✨🌭🌇
43 stars 14 forks source link

Ajout de Cosmic CMS #3

Open TheRevenge opened 2 years ago

TheRevenge commented 2 years ago

Voilà enfin la PR d'ajout de Cosmic !

N.B. : J'ai retiré le "patch sass" car c'était un bidouillage pour les machines avec un proc arm. Puis il est pas difficile à refaire :p

Si vous voyez des améliorations à faire, n'hésitez pas !

musotec commented 2 years ago

This commit definitely breaks networking for me. I cannot get inside my VM with pings and the out of box configuration breaks the http://127.0.0.1:1080/?sso=123 of the default guide.

It kinda half works when you migrate from an existing install and then run the container, but only when you do not do a just clean-docker. So something isn't quite right.

The resulting deployment does not result in something that lets me access cosmic cms from http://127.0.0.1/cms as the code would imply- due to some php error I did not bother to look into. I think it has something to do with the sql tables and the lack/presence of a missing "template" column (probably added here)

EDIT: just to be clear, the issue probably is with apache configuration, which seems to be included in the php container. Regardless, I cannot get to the main landing page from outside of my VM due to how it's setting up things in iptables/apache.

TheRevenge commented 2 years ago

I'll run some tests and see if I encounter the same issues. Thanks for your feedback!

musotec commented 2 years ago

I'll run some tests and see if I encounter the same issues. Thanks for your feedback!

I looked into this again, turns out the problem is with the static ip configuration you're doing. The problem is that the main project you're merging into uses the default docker networking stack, but you are assigning an IP that only works for your configuration.

Docker on my machine creates a network in the 172.16.0.0/12 subnet and automatically assigns the IPs 172.16.0.2-4 for the containers. When I remove the 192.x.x.x/24 static ip you assign in the docker-compose.yaml there is no issue with the configuration.

I am not sure why you're doing that, but it shouldn't be necessary in the out of the box implementation. You should perhaps remove your custom networking and retry a build from scratch. Leave any custom configuration to users who clone the repo.

TheRevenge commented 2 years ago

I remember it had to do something with the RCON connection (which wasn't working untill I put the static IP thing). I couldn't run tests on my computer (unrelated problems, the regular didn't work either) but I'll get on my macbook to fix this.

Edit: the problem is that the emulator ( Arcturus MS) has an IP whitelist for RCON. That's why I needed a static IP for the php-apache image. I thought the edit I made in the network configuration would have forced the subnet to stick to the given ip and range.

Pi-Bouf commented 2 years ago

@TheRevenge it works or nope ?

Now you removed static ipv4 and RCON only use comet, it allow RCON connection ?

TheRevenge commented 2 years ago

Well I have a shitty internet (I'm on vacation) so I can't really run my tests

TheRevenge commented 2 years ago

@Pi-Bouf Actually there are 3 .sql :

musotec commented 2 years ago

I believe @Pi-Bouf is saying that the "base sql for cosmic" that you have included is actually a "arcturus + cosmic" sql database. When they would prefer that the cosmic sql be only the sql needed to migrate from arcturus 3.5.0 -> cosmic.

Nigcra commented 1 year ago

With this patch, the external dependencies would also still need to be removed. I have tried the state and it requires a login for the external Gitlab server.

Klone nach '/therevenge/cms/cosmic'...
Username for 'https://git.krews.org':
Password for 'https://git.krews.org':
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://git.krews.org/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied
Schwerwiegend: Authentifizierung fehlgeschlagen für 'https://git.krews.org/Raizer/Cosmic.git/'
Schwerwiegend: Klonen von 'https://git.krews.org/Raizer/Cosmic.git' in Submodul-Pfad '/therevenge/cms/cosmic' fehlgeschlagen.
Pi-Bouf commented 1 year ago

Is-it really useful to have a cosmic ?

Nigcra commented 1 year ago

I think that would be useful. I would like to test a few things that I could already do via SQL. But it would be much more relaxed via a CMS. But I would not care which CMS.