Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogniter startup #1

Open
Kajvdh opened this issue Feb 20, 2018 · 14 comments
Open

ogniter startup #1

Kajvdh opened this issue Feb 20, 2018 · 14 comments

Comments

@Kajvdh
Copy link

Kajvdh commented Feb 20, 2018

Hey Donato,

Sorry that I'm creating an issue in the wrong repo but it seems that issues are disabled on the Ogniter repository.

I am trying to get ogniter up and running locally, Created the postrgres + mysql and updated the database.php configuration + installed the dependencies using composer, but when I go to http://localhost/public I am getting an error without any logs. Do you have a clue what I might have forgotten or do you know when you'll have a chance of expanding the readme?

UPDATE:
I figured out that I had to update the .env file with the necessary changes.
Now the problem is that the database is empty, is there any initialization script? I ran the migrations but tables like e.g. the countries table are still empty

If I manage to get it up and running I can update it as well an do a pull request.

Kind regards,

Kaj

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

Hi. Ogniter is meant to be run in a MySQL or MariaDB database.
Based on the errors you are getting I think it is better if you start from scratch, using the source code as an example, as the website requires some extra work before the first load.

@Kajvdh
Copy link
Author

Kajvdh commented Feb 20, 2018

Thanks a lot for your response @dlaynes, isn't there any dump of the database I can use? I think I already passed a lot of the necessary configuration, it is just that my database tables are empty at the moment.

Or is there some clone online already somewhere that I can use. There are a lot of people missing ogniter at the moment.

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

You can install the database with this command in the main directory:
php artisan migrate
I suggest you take a quick look at the documentation of Laravel 5.3. Thanks. Regards.

@Kajvdh
Copy link
Author

Kajvdh commented Feb 20, 2018

Yes I already did that, but the migrations do not populate the tables (e.g. countries), they only create the tables

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

You can install the default countries with the following command:
php artisan ogame:update-communities
https://github.com/dlaynes/Ogniter/blob/master/app/Ogniter/Api/Remote/Ogame/Command/UpdateCommunities.php
Please take a look at the other commands of the project.

@Kajvdh
Copy link
Author

Kajvdh commented Feb 20, 2018

Thank a lot for your help @dlaynes. I didn't know about the commands, I now managed to add the countries + the universes of the country I play in.
Looks like the data gets loaded fine, the portal loads ~~but when I click on a URL i receive this error:

"The requested URL /site/evolution was not found on this server."

Looks like I'm missing some rewriting logic that redirects that URL to the correct PHP. Any suggestions what I have to look in to?~~

Sorry, my bad. There was still something wrong with my apache:) Only the problem remains that the domain dropdown on the portal is empty..

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

Hi, if you want to test the website, run php artisan serve, then edit the URL in the .env file.

For a permanent installation, you should do some research about friendly urls and .htaccess files + mod_rewrite (Apache), or maybe friendly urls in Nginx

Another option is Laravel Valet for MacOS development environments

http://laravel.com/docs/5.3/valet

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

The dropdown will remain empty for 24 hours, because there are query caches for most common or processing-heavy queries

@Kajvdh
Copy link
Author

Kajvdh commented Feb 20, 2018

Awesome, once again a lot of thanks! I got it all working know. The only thing that I'm not sure of:

is the ogame:daily-stats the only command that I need to run daily with e.g. cron? Or are there any other commands that should run on a regular base as well?

@dlaynes
Copy link
Owner

dlaynes commented Feb 20, 2018

There are many background tasks, so the Laravel scheduler should be properly configured

https://laravel.com/docs/5.3/scheduling

Good luck with your project

@Kajvdh
Copy link
Author

Kajvdh commented Feb 21, 2018

Thanks! Got it. I had a deeper look into Laravel, I should've done that before spamming you.

Seems to be all working now, only TOP/FLOP stats results into an error because there is no index named 'idx' in the *_ranking_history tables in the mysql database. I see that there are a lot of commented-out queries in the PatchUniverses.php file which create these index but I'm not sure if this is from older code or which lines I'll have to uncomment.

@dlaynes
Copy link
Owner

dlaynes commented Feb 21, 2018

It seems the migrations were incomplete. Copy the lines from 158 to 160 in the PatchUniverses file and adapt it to your needs (and add the index to the ranking_history_template table too).

@Kajvdh
Copy link
Author

Kajvdh commented Feb 21, 2018

Works perfect now! Thanks a lot for you help! 👍

@Kajvdh
Copy link
Author

Kajvdh commented Feb 22, 2018

Any ideas what I should look into if the localization is not working? It sets the \App::setLocale to the correct code but everything remains in english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants