So i can change the dockerfile accordingly to copy my version of una in to be deployed instead?
Lets say i do not want to download the trident but instead copy the una i currently have to the docker image what other potential settings do i need to take note of or change and for an instance how do i run the app and sql in the docker file do u have the command to do it? I was looking at the dependencies UNA would need before and this dockerfile is really helpful in that aspect which I would like to thank you. What are the potential fields to change to use my own application instead of downloading as well as how do i run the application or databases such as the UNA is running. May I know as well if there are any changes in the dependencies?
Yes, feel free to make changes you think are appropriate for your situation.
This docker file is based on other docker - php:5-apache - which don't have mysql server, so DB server is supposed to be installed on host machine, however you can choose other base docker which has mysql server included and add steps to create DB as well
Would you happen to know this error which I am currently experiencing. I have apache2 and mysql running. However, through some research i have learned that it might be related to the php.ini issue I have this error message while trying to access una that is currently hosted in the docker container. Error message: SQLSTATE[HY000] [2002] No such file or directoryThe issue is that the database tables and user has already been configured and given access. I have also declared the path for mysql.default_socket = and restarted the service and it still didnt work. The una app, phpmyadmin and database are all in a single docker container. However, when I change it to the new user that allows this since they say do not use root, I get a localhost refused connection instead and the entire site wont be able to be accessed. Currently my docker environment is using the default env settings as there are no php.ini files. I do not have a php.ini file that is suitable for docker environment either. accessing through localhost now like localhost:port/una
Hi I have managed to solve this issue thanks to your guidance, however after I have managed to start up the app and login I realised that I am unable to upload any picture or video during the creation of the post at the public timeline. Is there a particular configuration or settings that I am required to change to allow the uploading? It mentioned Oops an error occured with xx.png file: error occured. May I know what is the issue with this?
Please check if permissions are ok, you can also check other configurations in Studio > Dashboard > Host Tools > Files And Folders Permissions & Server Audit
In terms of permissions to folders in the container I followed the recipe of the provided dockerfile which is this line: chmod 777 ./una/inc ./una/cache ./una/cache_public ./una/logs ./una/tmp ./una/storage \ && chmod +x ./una/plugins/ffmpeg/ffmpeg.exe Is there anything missing?
In terms of studio side, I just checked for all of the paths the current status is the same as the desired status
Prior to deploying the application to a docker container the uploading of pictures and videos was working well locally. This only occurred after I deployed it. Forgot to update this at the previous comment. Could there be some other configurations or settings I would need to change since the uploading is not truly local now. I am accessing the site through host machine browser and the site is currently hosted in the docker container. May I know what can I do in this situation?
Hi, I did all the steps that you have informed me to do so and turns out it was just that the server did not have permission to access the storage folder hence the failure of uploading. However, I realised that after being able to upload the pictures and videos the pictures were working fine however, after uploading a video and posting it, the cron job does not takes place. It only works when I run the command php -c /var/www /var/www/html/una/periodic/cron.php manually. I have included this
We have Docker file for old version of UNA, which was called Trident, but I think it can be easily adopted for current version of UNA:
https://hub.docker.com/r/boonex/trident/dockerfile/
Z
So i can change the dockerfile accordingly to copy my version of una in to be deployed instead?
Lets say i do not want to download the trident but instead copy the una i currently have to the docker image what other potential settings do i need to take note of or change and for an instance how do i run the app and sql in the docker file do u have the command to do it? I was looking at the dependencies UNA would need before and this dockerfile is really helpful in that aspect which I would like to thank you. What are the potential fields to change to use my own application instead of downloading as well as how do i run the application or databases such as the UNA is running. May I know as well if there are any changes in the dependencies?
Yes, feel free to make changes you think are appropriate for your situation.
This docker file is based on other docker - php:5-apache - which don't have mysql server, so DB server is supposed to be installed on host machine, however you can choose other base docker which has mysql server included and add steps to create DB as well
Z
Would you happen to know this error which I am currently experiencing. I have apache2 and mysql running. However, through some research i have learned that it might be related to the php.ini issue I have this error message while trying to access una that is currently hosted in the docker container. Error message: SQLSTATE[HY000] [2002] No such file or directory The issue is that the database tables and user has already been configured and given access. I have also declared the path for mysql.default_socket = and restarted the service and it still didnt work. The una app, phpmyadmin and database are all in a single docker container.
However, when I change it to the new user that allows this since they say do not use root, I get a localhost refused connection instead and the entire site wont be able to be accessed. Currently my docker environment is using the default env settings as there are no php.ini files. I do not have a php.ini file that is suitable for docker environment either. accessing through localhost now like localhost:port/una
I would suggest you to try to specify patch to MySQL socket directly in UNA inc/header.inc.php file or specify it during UNA installation.
Z
Hi I have managed to solve this issue thanks to your guidance, however after I have managed to start up the app and login I realised that I am unable to upload any picture or video during the creation of the post at the public timeline. Is there a particular configuration or settings that I am required to change to allow the uploading? It mentioned Oops an error occured with xx.png file: error occured. May I know what is the issue with this?
This is what I have included in my php.ini
echo "memory_limit=192M \n\ post_max_size=100M \n\ upload_max_filesize=100M \n\ error_log=/var/www/php_error.log \n\ error_reporting=E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT \n\ display_errors=Off \n\ log_errors=On \n\ sendmail_path=/usr/sbin/sendmail -t -i \n\ date.timezone=UTC" > /var/www/php.ini
Is there any other configuration that I am missing or not done to cause this Oops an error occured with xx.png file: error occured error?
Please check if permissions are ok, you can also check other configurations in Studio > Dashboard > Host Tools > Files And Folders Permissions & Server Audit
Z
In terms of permissions to folders in the container I followed the recipe of the provided dockerfile which is this line:
chmod 777 ./una/inc ./una/cache ./una/cache_public ./una/logs ./una/tmp ./una/storage \ && chmod +x ./una/plugins/ffmpeg/ffmpeg.exe
Is there anything missing?
In terms of studio side, I just checked for all of the paths the current status is the same as the desired status
Prior to deploying the application to a docker container the uploading of pictures and videos was working well locally. This only occurred after I deployed it. Forgot to update this at the previous comment. Could there be some other configurations or settings I would need to change since the uploading is not truly local now. I am accessing the site through host machine browser and the site is currently hosted in the docker container. May I know what can I do in this situation?
1) Please provide screenshots of
Studio > Dashboard > Host Tools > Files And Folders Permissions
and
Studio > Dashboard > Host Tools > Server Audit
2) Check if uploading enabled on your web-server
3) Check browser network for the output when you perform upload
4) Check other uploaders - such as Crop uploader (for profile cover) and Multiple uploader in Albums for example
Z
Hi, I did all the steps that you have informed me to do so and turns out it was just that the server did not have permission to access the storage folder hence the failure of uploading. However, I realised that after being able to upload the pictures and videos the pictures were working fine however, after uploading a video and posting it, the cron job does not takes place. It only works when I run the command php -c /var/www /var/www/html/una/periodic/cron.php manually. I have included this
RUN echo "* * * * * php -c /var/www /var/www/html/una/periodic/cron.php" > /var/www/crontab
RUN crontab /var/www/crontab
in my dockerfile and also started the cron service. May I know what might be the issue here?
This is what I found in the server audit:
Site setup
Use -h to get full help or, even better, run 'man ffmpeg'
no crontab for www-data
if you are unsure if output is correct then manual server audit may be requiredMaybe you need to point full path to php binary ?
Z
Yes, it is working now. Thank you so much!
zhalkiar Can you share the UNA docker file that you made, or can you put in on the Docker website for us? UNA Docker is a good idea.
Hi zhalkiar
Have you published this docker file? it would be interesting update it with new versions of UNA.