Comments (33)
Do you need help with the github action i would like an upto date image and I am ready to build a Dockerfile.
Any help is appreciated! I already started working on this but feel free to take it over. You can find my code on https://github.com/Myzel394/HRConvert2/tree/add-docker - or create a new one from scratch, it's up to you :D
Thanks, but i already have a bare bones setup.
from hrconvert2.
I don't see rar being installed so that won't work and the offical rar package is only available for amd64 and not for other platforms.
But thanks for the example.
from hrconvert2.
One more step: forked repository HRconvert2-Docker, added script to build the image yourself and also choose HRConvert2 release. Self serve https://gitlab.com/the-automation-club/hrconvert2-docker
from hrconvert2.
So I've started Dockerizing HRConvert2. I have not tested it at all yet, I will try to get to that tomorrow. There is, however, a Dockerfile now in the official repo. Feel free to help me test building it.
I created an account at Docker and am going to upload everything over there when it is ready.
I also cleaned up the directory structure a bit, which further modularizes the GUI, and makes the root of the project look more presentable, which helps draw attention to the important bits. Like the dockerfile and the Documentation folder. I tried to get the license out of the root, but Github won't seem to recognize the project as having a license with a relocated LICENSE file? To avoid problems I just put the LICENSE file back in the root. The project never stopped being GPLv3.
from hrconvert2.
Why at docker? Just use ghcr, at least you wont burden your users with ratelimits docker imposes.
from hrconvert2.
Note: I can add the relevant github actions workflow file if that's okay with you, but it'd take some time since I haven't worked much with php yet
from hrconvert2.
Interesting.
I'd be interested in learning how to do this with github actions. If you have a file to make that easier I'd definately credit you for that.
Either way I'll see what I can do. Especially considering Docker seems to be the preferred installation method for most users.
from hrconvert2.
@zelon88 nice! I can take a look at it this weekend and will open a PR once I'm ready / need further clarifications.
from hrconvert2.
I took a quick look at the code; config.php
contains all configurable settings, doesn't it? In this case, it would be nice if we could change this to load the variables first from env and then fallback to the default values.
I don't know much about PHP, but it would probably do something like this:
$URL = env_get_string("URL", 'localhost'); // try to load environmental variable "URL" and fallback to "localhost"
$VirusScan = env_get_bool("VirusScan", FALSE); // try to load environmental variable "VirusScan", try converting it to bool and fallback to FALSE
$AllowUserVirusScan = env_get_bool("AllowUserVirusScan", TRUE);
$ScanCoreMemoryLimit = env_get_int("ScanCoreMemoryLimit", 268435456);
Some caveats to look out:
- For
bool
I'd propose to only usetrue
for:yes
,y
,1
,t
,true
oron
- all other values should be defaultfalse
- If type conversion fails, fallback to default or / and show a warning that there was an error.
Can you implement that? :D
from hrconvert2.
Do you need help with the github action i would like an upto date image and I am ready to build a Dockerfile.
from hrconvert2.
I took a quick look at the code;
config.php
contains all configurable settings, doesn't it? In this case, it would be nice if we could change this to load the variables first from env and then fallback to the default values. I don't know much about PHP, but it would probably do something like this:$URL = env_get_string("URL", 'localhost'); // try to load environmental variable "URL" and fallback to "localhost" $VirusScan = env_get_bool("VirusScan", FALSE); // try to load environmental variable "VirusScan", try converting it to bool and fallback to FALSE $AllowUserVirusScan = env_get_bool("AllowUserVirusScan", TRUE); $ScanCoreMemoryLimit = env_get_int("ScanCoreMemoryLimit", 268435456);
Some caveats to look out:
- For
bool
I'd propose to only usetrue
for:yes
,y
,1
,t
,true
oron
- all other values should be defaultfalse
- If type conversion fails, fallback to default or / and show a warning that there was an error.
Can you implement that? :D
You could just make a short bash script at the start of the container and update the container.
from hrconvert2.
Do you need help with the github action i would like an upto date image and I am ready to build a Dockerfile.
Any help is appreciated! I already started working on this but feel free to take it over. You can find my code on https://github.com/Myzel394/HRConvert2/tree/add-docker - or create a new one from scratch, it's up to you :D
from hrconvert2.
You could just make a short bash script at the start of the container and update the container.
I'm note sure what you mean. Do you mean a script that sets the variables before starting the container?
from hrconvert2.
Yeah so the programm does not need changing you just make a short bash script which takes the envs andedits the config.
from hrconvert2.
Yeah so the programm does not need changing you just make a short bash script which takes the envs andedits the config.
Wouldn't this require rebuilding the image each time you change the env?
from hrconvert2.
No, have a look at https://github.com/archef2000/ocserv as an example of mine.
from hrconvert2.
I have a working docker image but i have problems with rar convertions even though when executing rar with php shell as the user i can execute it. (I run rar on arm64 with qemu)
from hrconvert2.
@zelon88 I have tried V 5.11 and 6.0.2 both failing archiving as it just returns the command help for rar. What version have you tested that work?
from hrconvert2.
Steps to build the image using latest release :
- Clone repository https://github.com/dwaaan/HRConvert2-Docker
- Create 6 random number running Linux command
for __number in $(seq 1 6); do tr -dc A-Za-z0-9 </dev/urandom | head -c 30; echo; done
- Copy the random numbers to
config.php
into variables$Salts1
to$Salts6
- Edit
Dockerfile
and change VERSION to the last available at https://github.com/zelon88/HRConvert2/releases - Buils docker image running command
docker build -t hrconvert2:local .
from hrconvert2.
Following this thread as dwaaan/hrconvert2-docker:latest does not work for me with https://github.com/dwaaan/HRConvert2-Docker/blob/master/docker-compose.yml
from hrconvert2.
@bit-man I tried to deploy your image from dockerhub on TrueNAS Scale using Truecharts custom-app but it's not working. Your apache setup is using /var/run
which isn't compatible on most modern linux deployments where /var/run
mounts to /run
which is a temp folder. Could you update the image so it works with modern linux deployments?
Thank you!
from hrconvert2.
@gravelfreeman just added a new issue to the project to reflect the previous request
Please let me know what error pops up when using the current image
from hrconvert2.
@gravelfreeman is ok to write down the error here in case you don't have and don't want to open a Gitlab account
from hrconvert2.
@bit-man sorry for the delay, here's the error
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
from hrconvert2.
@zelon88 I have tried V 5.11 and 6.0.2 both failing archiving as it just returns the command help for rar. What version have you tested that work?
v5.5 works for me.
from hrconvert2.
@gravelfreeman I don't get the relationship between TrueNAS and HConvert2 image and how it contribute a to failure. The /var/run folder is created at build time inside HConvert2 docker image and used only by ubuntu:20.04 base image that's why can't understand why both products interact and why it fails for you
Please explainme how you use them so I can help
from hrconvert2.
@bit-man I tried to deploy your image from dockerhub on TrueNAS Scale using Truecharts custom-app but it's not working. Your apache setup is using
/var/run
which isn't compatible on most modern linux deployments where/var/run
mounts to/run
which is a temp folder. Could you update the image so it works with modern linux deployments?Thank you!
TrueCharts maintainer here:
TrueCharts Custom-App is intended as a "might work for some simple things, might not work at-all", in this case it clearly isn't the right tool for the job and other maintainers shouldn't be bothered with this.
I've checked the linked gitlab dockerfile and image, it looks perfectly fine and, in essence, k8s capable just-fine.
And I also have my personal suspicions why custom-app might not work for you in this case. which are not related to the work this project is doing or the container.
from hrconvert2.
@bit-man I tried to deploy your image from dockerhub on TrueNAS Scale using Truecharts custom-app but it's not working. Your apache setup is using
/var/run
which isn't compatible on most modern linux deployments where/var/run
mounts to/run
which is a temp folder. Could you update the image so it works with modern linux deployments?
Thank you!TrueCharts maintainer here: TrueCharts Custom-App is intended as a "might work for some simple things, might not work at-all", in this case it clearly isn't the right tool for the job and other maintainers shouldn't be bothered with this.
I've checked the linked gitlab dockerfile and image, it looks perfectly fine and, in essence, k8s capable just-fine. And I also have my personal suspicions why custom-app might not work for you in this case. which are not related to the work this project is doing or the container.
Thanks for replying. My lack of knowledge is at fault here I guess. I think it would be really great to see this app added to the Truecharts catalog. Sorry for the trouble!
from hrconvert2.
I've checked the linked gitlab dockerfile and image, it looks perfectly fine and, in essence, k8s capable just-fine. And I also have my personal suspicions why custom-app might not work for you in this case. which are not related to the work this project is doing or the container.
@Ornias1993 just let me know how can I help in case you found the root issue
BTW I'm using bitman09/hrconvert2:3.1 in microk8s using this deployment.yml
from hrconvert2.
Why at docker? Just use ghcr, at least you wont burden your users with ratelimits docker imposes.
Why not both? :D I never faced ratelimits on Docker and I also don't think fully relying on one service is good either
from hrconvert2.
@zelon88 the issue with the current Dockerfile is that rar only works for amd64 because of is only available for Intel CPUs. This is how I solved it running the x86-64 version using qemu in arm64
COPY rar-arm64 /tmp/rar-arm64
RUN DPKG_ARCH="$(dpkg --print-architecture)"; \
if [ "${DPKG_ARCH}" = "amd64" ]; then \
apt-get install -y rar && rm /tmp/rar-arm64; \
else \
dpkg --add-architecture i386 && \
apt-get install qemu-user-static libc6-i386-cross libstdc++6-i386-cross -y && \
cp /usr/i686-linux-gnu/lib/libm.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libc.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libpthread.so.0 /lib && \
cp /usr/i686-linux-gnu/lib/ld-linux.so.2 /lib && \
cp /usr/i686-linux-gnu/lib/libstdc++.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libgcc_s.so.1 /lib && \
wget https://www.rarlab.com/rar/rarlinux-x32-700b3.tar.gz -O /tmp/rarlinux-x32-700b3.tar.gz && \
tar -zxvf /tmp/rarlinux-x32-700b3.tar.gz -C /tmp && \
chmod +x /tmp/rar-arm64 && ln -s /tmp/rar-arm64 /usr/bin/rar; \
fi
from hrconvert2.
So I've built an Official Docker Image at https://hub.docker.com/repository/docker/zelon88/hrconvert2/general
However, the repo is tagged v3.3.2 and it downloads the latest version. So I've gotta fix that. But I've been working on this for hours now and I wanna play some Terraria so I'll pick this up tomorrow.
<3 Open Source
from hrconvert2.
I'd also like to take a minute to really thank dwaaan because if it wasn't for his original Docker repo, there's a good chance most of this community wouldn't exist. I hope whatever dwaaan is up to that he's well and enjoying life. Thanks again!
from hrconvert2.
Related Issues (20)
- Converting files throw error : `failed second stage validation!` HOT 6
- `rar` package unavailable on ARM HOT 2
- v3.1 - xlsx to pdf: failed second stage validation! HOT 9
- Video to Gif conversion HOT 2
- Support for subtitle conversions HOT 3
- Converter is not working HOT 3
- Command line or HTTP Rest API usage? HOT 4
- Conversions not working - <title>404 Not Found</title> HOT 3
- .avi file not shown after successful upload HOT 4
- Docker package for NAS HOT 1
- Hover Tooltips? HOT 1
- Default Dimensions For Photos HOT 1
- Error Timezone HOT 2
- Access by API rest? HOT 2
- The specified Data Storage Directory does not exist HOT 3
- SVG to... does nothing HOT 1
- mp3 converting error
- Docker image missing rar command HOT 5
- [Request] - Docker Compose File HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hrconvert2.