-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: Feature/docker setup #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm protection is a good thing and shouldn't be worked around IMO, configure script is expected to work fine without the need for root account.
I am considering running the script with Apache user. |
@r3c Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll checkout your change locally to try it, as I'm clearly missing knowledge about Docker :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got stuck when trying to run yAronet using this Docker setup because no locale was configured. I believe something like this in the Dockerfile should do the trick:
apt-get install -y locales # can be added to your existing apt-get command
sed -ri 's/# (en_US.UTF-8 UTF-8)/\1/' /etc/locale.gen
locale-gen
There are other stuff missing but they're bugs in my code rather than related to this review, so I'll quickly fix them :) (RewriteBase is incorrect in .htaccess files, configuration of static directory seems invalid, and website logo doesn't display properly)
Oh, yeah, I was sticking to 'C' locale, which you need to input on the install.php page. But let's adjust to your default one. RewriteBase needs at least one argument, which is "/" in my case. Could you update the default to be "/" please? |
Yes you're right about RewriteBase being broken, let me fix that :) |
Default locale changed to en_US.UTF-8 |
Added a retry loop for db connection to not fail hard when db container is not ready yet. |
Almost there! It's mostly working now, the only remaining issue I can't get around for now is
I don't know if it's related to root user or something else and will continue to investigate. Thanks for all your new changes! [update] Grant permissions on Now this is done I'm having errors when web host tries to mount, saying it cannot resolve the DB hostname 😕 |
Can you share the entire log? |
Also, this is good to do to be able to run docker command with being root. https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user |
That's not the same: your link describes how to configure Docker to avoid entering Here is the log, seems something is going wrong with the SQL setup, I'll try to see what exactly:
|
I know it is not the same, just sharing for removing you some pain:) |
Ah OK :) [edit] Removed the "tmp" folder, now it's booting. Let's wait and see :) |
Working! Here is the only change I applied to your latest patch:
How do you feel about applying this change and merging your patch into master? Seems a good baseline :) |
I am good! There are improvement points around the entrypoint, and permissions, but they are not critical for a local environment. |
Done! Thanks a lot for your contribution and help! 👍 |
Introduce a simple Docker / docker-compose setup for local environment.