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

Docker build added #38

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Docker build added #38

wants to merge 7 commits into from

Conversation

takov751
Copy link

Greetings,

I created a simple docker version, which was double staged for anyone whom using their own registry or want to move docker image after build. API_ID and API_HASH loaded from env so that it can be called easily. There is a room for improvement, however is does the job. Of course because of the native lib dependencies (which could be integrated later to make it cross-platform) it's only works on x86_64

@takov751
Copy link
Author

Config.json file missing from this pull request due to user error . I will do that when I get back to the keyboard.

@tejado
Copy link
Owner

tejado commented Jun 11, 2022

Awesome - thank you.
How to provide the confirmation code in that way? And it is important to know and to describe, that the confirmation code is asked every time as the database is not cached if there is no persistent volume for it.

@takov751
Copy link
Author

takov751 commented Jun 11, 2022

I wrote a small md which mentions if you start running it with docker run it's attaches the cli in your terminal so it's rather convenient for now. If someone wraps it inside a tmux / screen session or run it from portainer or yacht it can be more user friendly to attach detach the docker cli session I realise it now I should have write it inside readme. If I don't forget I will merge the run.md and readme.md in this PR

@tejado
Copy link
Owner

tejado commented Jun 11, 2022

I will wait for your additions :) Can ping you here in few days if you forgot about it.

@takov751
Copy link
Author

takov751 commented Jun 12, 2022

Well, I have moved files to root of the repo to make it easier for anyone. Hope you find it useful.
Oh and I included somewhat a solution that user will have presistent session after a cold run to setup session.

@takov751
Copy link
Author

takov751 commented Jun 12, 2022

One more thing when i tried to rebase image to from node:17-bullseyes-slim to node:18-buster-slim on startup Parcel failed to build The site

@tylerhindi1

This comment was marked as off-topic.

@takov751

This comment was marked as off-topic.

@tejado
Copy link
Owner

tejado commented Jun 12, 2022

One more thing when i tried to rebase image to from node:17-bullseyes-slim to node:18-buster-slim on startup Parcel failed to build The site

do you have an error message on that?

@tejado
Copy link
Owner

tejado commented Jun 12, 2022

Well, I have moved files to root of the repo to make it easier for anyone. Hope you find it useful. Oh and I included somewhat a solution that user will have presistent session after a cold run to setup session.

Now, files are duplicated :) And maybe instead of modifying / providing a separate docker config file, you can adjust the server.js, to check if there are env vars set. If not, then a config.js has to be there.

@tejado tejado self-assigned this Jun 12, 2022
@tejado tejado added the enhancement New feature or request label Jun 12, 2022
@takov751
Copy link
Author

Well, I have moved files to root of the repo to make it easier for anyone. Hope you find it useful. Oh and I included somewhat a solution that user will have presistent session after a cold run to setup session.

Now, files are duplicated :) And maybe instead of modifying / providing a separate docker config file, you can adjust the server.js, to check if there are env vars set. If not, then a config.js has to be there.

Fair enough . I was thinking more like just keeping config.js with const = env || default . Would that be more user friendly ?

@takov751
Copy link
Author

So I made some changes, which can cause problem for non-docker users. Which I just realised now. Thanks for the quick feedback and communication 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants