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

Feature/docker #236

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Feature/docker #236

wants to merge 12 commits into from

Conversation

slawkens
Copy link
Owner

@slawkens slawkens commented Sep 16, 2023

This setup is extremally slow, takes more than 2 seconds per request, even with status disabled.

The reason for this is currently not known for me.

Edit: I found the reason and fixed it. That was because I was mounting volume directly through WSL 2, which is very slow.
Now it loads blazing fast.

How to build:
First clone this repo, and change branch to feature/docker (this PR)

git clone https://github.com/slawkens/myaac.git
cd myaac
git checkout feature/docker
docker compose up --build

It may take few minutes to download everything and build.

After this you will have 3 containers:

TFS schema will be automatically imported by docker init script.

in the 4) step - configuration set server path as follows:
/home/www-data/forgottenserver

@ivenspontes
Copy link
Contributor

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

@slawkens
Copy link
Owner Author

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

@ivenspontes
Copy link
Contributor

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

Yes, running inside WSL, with compose volume, but i remove composer commands from Dockerfile and run inside container.
Which requests were slow?

image

@slawkens
Copy link
Owner Author

slawkens commented Sep 22, 2023

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

Yes, running inside WSL, with compose volume, but i remove composer commands from Dockerfile and run inside container. Which requests were slow?

image

Do you mean, you are running with this volumes defined? Which I commented out in latest commits?

72d7ee8#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3L16

And it is no slow?

Or you are running just this PR branch with latest changes, and it is no slow?

Because I'm confused now. :P

@ivenspontes
Copy link
Contributor

i revert the comment in volume and commented the COPY,

image

@slawkens
Copy link
Owner Author

slawkens commented Sep 23, 2023

i revert the comment in volume and commented the COPY,

image

Ah ok. Well, for me all PHP requests are slow, but the rest (assets etc.) loads just fine.
image

May be cause I am running in on Windows with WSL 2, and I've heard reading from windows partition is slow.

Do you use WSL 1 or WSL 2?

@ivenspontes
Copy link
Contributor

i revert the comment in volume and commented the COPY,

image

Ah ok. Well, for me all PHP requests are slow, but the rest (assets etc.) loads just fine.
image

May be cause I am running in on Windows with WSL 2, and I've heard reading from windows partition is slow.

Do you use WSL 1 or WSL 2?

WSL2, but I put the files inside wsl before up containers, as I commented.

@@ -0,0 +1,53 @@
FROM php:8.2-apache
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using multi-stage build to avoid building all of this each time and why not nginx?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any advantages of using nginx on single host for development purposes (this docker image is not intended for production).

About multi-stage build: thanks, didn't knew about that one. Will dive into it, and will see what can be done.

@slawkens slawkens mentioned this pull request Dec 14, 2023
@RRadziejewski
Copy link

72.20.0.1 - - [29/Feb/2024:12:09:42 +0000] "POST /install/ HTTP/1.1" 500 321 "http://localhost:8001/install/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" [Thu Feb 29 12:09:48.506104 2024] [php:error] [pid 18] [client 172.20.0.1:42750] PHP Fatal error: Uncaught RuntimeException: Seems that the table myaac_account_actions of MyAAC doesn't exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting http://localhost:8001/install in /var/www/html/system/init.php:143\nStack trace:\n#0 /var/www/html/index.php(70): require_once()\n#1 {main}\n thrown in /var/www/html/system/init.php on line 143 172.20.0.1 - - [29/Feb/2024:12:09:48 +0000] "GET / HTTP/1.1" 500 321 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" [Thu Feb 29 12:09:51.482839 2024] [php:error] [pid 22] [client 172.20.0.1:42766] PHP Fatal error: Uncaught RuntimeException: Seems that the table myaac_account_actions of MyAAC doesn't exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting http://localhost:8001/install in /var/www/html/system/init.php:143\nStack trace:\n#0 /var/www/html/index.php(70): require_once()\n#1 {main}\n thrown in /var/www/html/system/init.php on line 143 172.20.0.1 - - [29/Feb/2024:12:09:51 +0000] "GET / HTTP/1.1" 500 321 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"

Is it even working anymore ? Whenever i try to reach MyAcc it gives me this error.

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

Successfully merging this pull request may close these issues.

None yet

4 participants