Closed Jenni32222 closed 2 years ago
I want docker compose
I'm working on it: https://github.com/PussTheCat-org/docker-proxitok-quay
(it currently doesn't work)
Cool, Will you push it here in official repo or will just stay as a fork?
Here is a Dockerfile
that works at least for displaying Discover and watching content from users:
FROM php:8
RUN apt-get update && apt-get install -y \
libzip-dev \
unzip
RUN docker-php-ext-install -j$(nproc) zip
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
RUN curl -o composer.phar https://getcomposer.org/download/latest-stable/composer.phar \
&& chmod +x composer.phar \
&& ./composer.phar -V
RUN curl -Lo proxytok.zip "https://codeload.github.com/pablouser1/ProxiTok/zip/refs/heads/master" \
&& unzip proxytok.zip \
&& rm proxytok.zip
RUN cd ProxiTok-master \
&& ../composer.phar install \
&& rm ../composer.phar
WORKDIR ProxiTok-master
CMD php -S 0.0.0.0:8080
I do keep getting a lot of API errors, but I'm not sure that it is because of the installation or a general issue with TikToks API requests.
done. https://proxitok.esmailelbob.xyz/
but I keep getting errors like:
There was an error processing your request!
HTTP Code: 500
API error code 20 (SIGNATURE_CONNECTION_ERROR)
So yeah it's weird maybe because of installation? I would assume tiktok can block some IP because lots of requests but I just installed this so I think it's installation
done. https://proxitok.esmailelbob.xyz/
but I keep getting errors like:
There was an error processing your request! HTTP Code: 500 API error code 20 (SIGNATURE_CONNECTION_ERROR)
So yeah it's weird maybe because of installation? I would assume tiktok can block some IP because lots of requests but I just installed this so I think it's installation
Hi, that is because you are trying to run Proxitok in standard mode without a remote or local signer. Quick explanation: Now Proxitok can use the new api from TikTok to fetch data, which requires signing URLs. This at the moment can only be done with a remote signer or a local chromedriver instance. A quick workaround would be setting the API_FORCE_LEGACY enviromental variable to 1. This will force Proxitok to use the legacy endpoints, which do not require signing. You can get more info on the available modes here and more info on the available config here
About the Docker installation, this is one of my top priorities. Having a Proxitok Docker image working would increse the amount of public instances which would be helpful for everyone. I'm currently working on an image that runs on standard mode.
Oh! Well good news that https://github.com/pablouser1/ProxiTok/issues/13#issuecomment-1067748033 works as intended
Bad news on other hand I noticed legacy already ticked on by default but I think I need to re-apply it in settings which is kinda a bug? (I left my instance running for testing) and where is the config file? I'm inside my docker container but I'm a big confused...Which one of these are my config file so I can apply API_FORCE_LEGACY
root@b9c581beb9f2:/ProxiTok-master# ls
LICENSE README.md cache composer.json index.php routes.php scss styles views
Procfile app components composer.lock layouts scripts setup vendor
Oh environment variable right...I'm still dumb with docker sorry. It works (so far) good!
Thanks to @MoriTanosuke
My image now works: https://quay.io/repository/pussthecatorg/proxitok / https://github.com/PussTheCat-org/docker-proxitok-quay
It's not perfect since it's still using the php development server, but I couldn't make it work with a proper apache (403 eror), right now, I'd say it's "good enough", but it's FAR from perfect (maybe not suitable for big public instances).
Also, API_FORCE_LEGACY
is used, which isn't ideal
PS: PHP is such a pain.
Docker is now working with this commit: f0765e266c4e4328652570f8e4390f43f79bf5e6 It works both in standard and legacy mode using PHP8 and Apache (maybe I'll change it to Nginx in the future) To use it just clone the repo and run
docker-compose up
Now you can visit the website on http://localhost:8080
@pablouser1 I mean...not that I'm against it... but you know, if you reuse my files (you literally have the same style, and whole blocks that are copied from them)... you have to respect the license...
I mean, I would have been okay in giving you permission to re-license them... but you should have asked first.
@TheFrenchGhosty Thanks for your work, I'll use your image if you plan on updating it.
@Jenni32222 I'm currently doing it, should be ready in ~5 minutes if everything goes right.
@pablouser1 I mean...not that I'm against it... but you know, if you reuse my files (you literally have the same style, and whole blocks that are copied from them)... you have to respect the license...
I mean, I would have been okay in giving you permission to re-license them... but you should have asked first.
Sorry about that. I didn't even noticed that you were using a license. Should I credit you on the beginning of the file, the README.md or something?
@Jenni32222 Done. Image is production ready now. (it took longer than I thought because the PHP docker-specific functions aren't good enough to install redis (but good enough for zip) and because I did a stupid mistake
@pablouser1 End of the README please, feel free to pull my changes by the way, your Dockerfile is REALLY flawed (I fixed it), also feel free to recommend my Docker image.
Would it be possible to create this project in a Docker container?