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

Tutorial / Docker image? #42

Open
koinupapi opened this issue Feb 12, 2023 · 10 comments
Open

Tutorial / Docker image? #42

koinupapi opened this issue Feb 12, 2023 · 10 comments

Comments

@koinupapi
Copy link

Hi there!

I wanted to see if you had any plans for a tutorial of setting this up.

I want to try self-hosting this so much! I got as far as running the maglit container via Portainer, and even set up a web app in a new Firebase project. I input all the variables that I got from Firebase, but it would just keep saying "Failed to fetch". The url would always be "localhost:3000/". I tried making the .env.local file, but I didn't know where or how to upload it to firebase project.

I guess it must be easy for more experienced techies, but unfortunately I couldn't get it to work.

And of course, I know you're already making a docker image, I just wanted to see how that's coming along. :)

Thank you! I can't wait to be able to try this on my own system :)

@NayamAmarshe
Copy link
Owner

Hi! Sorry, I didn't update the documentation properly. Did you change the variables here: https://github.com/NayamAmarshe/MagLit/blob/main/docker-compose.yaml

@koinupapi
Copy link
Author

Hi! Sorry, I didn't update the documentation properly. Did you change the variables here: https://github.com/NayamAmarshe/MagLit/blob/main/docker-compose.yaml

Hi! Thank you for replying!

Yes, I did change those variables.

@zodiacg
Copy link

zodiacg commented Apr 7, 2023

Same problem here. Is there any env variable I should set to see more logs from the console?

From the source code of the index page, it seems the NEXT_PUBLIC_BASE_URL env isn't read properly. It's still localhost:3000

===

Checked again, the index.html inside the docker image is hardcoded with localhost:3000.

@0xspade
Copy link

0xspade commented Apr 7, 2023

Same problem here. Is there any env variable I should set to see more logs from the console?

From the source code of the index page, it seems the NEXT_PUBLIC_BASE_URL env isn't read properly. It's still localhost:3000

===

Checked again, the index.html inside the docker image is hardcoded with localhost:3000.

I can confirm this.

@NayamAmarshe, I also have a question, Does the link expires? when?

@NayamAmarshe
Copy link
Owner

Sorry for not getting this right guys. I've been really busy. I tried the docker image and I too am facing these problems.
I'll see if I can make time to fix it.

Meanwhile, requesting @diegonicacio to see if they can take a look as they were the one who published the docker image PR 🙏

@diegonicacio
Copy link
Contributor

I think I found the main issue. Opened another issue explaining it further that can be found at #43
Since it requires some code changes for the final solution, I might not be able to help much (not proficient with js) but I will look into the docker part and see if we can go with a workaround for now, so users can still use it in docker

@diegonicacio
Copy link
Contributor

Added #44 to make things easier to build, since users will have to build their own images for now.
Already tested on my local environment and it's working so far using docker (you can test it at https://maglit.nicacio.nl/)

@koinupapi , these are the steps that I used

1 - Cloned repo
2 - Setup .env.local file
3 - Changed the external port in docker-compose.yml from 3000:3000 to 80:3000 (since I'm running on http with a SSL proxy in front of it)
4 - npm run docker

If you don't have npm on your environment, instead of npm run docker in step 4, you can go with:

sudo docker-compose build
sudo docker-compose up -d

If you have any issue following these steps (after #44 gets merged) let us know

@koinupapi
Copy link
Author

Added #44 to make things easier to build, since users will have to build their own images for now.
Already tested on my local environment and it's working so far using docker (you can test it at https://maglit.nicacio.nl/)

@koinupapi , these are the steps that I used

1 - Cloned repo
2 - Setup .env.local file
3 - Changed the external port in docker-compose.yml from 3000:3000 to 80:3000 (since I'm running on http with a SSL proxy in front of it)
4 - npm run docker

If you don't have npm on your environment, instead of npm run docker in step 4, you can go with:

sudo docker-compose build
sudo docker-compose up -d

If you have any issue following these steps (after #44 gets merged) let us know

I wanna thank you so much for taking the time to help me with this.
I feel so bad that you took the time to test and write all of this out for me, but I actually don't know how to do much more with code than doing a basic docker compose or just running a container.
I've barely starting the surface of using the "docker build" to add plugins to mkdocs haha.

I'll do my best, but I'm afraid I won't be much help in terms of testing. I'm sincerely sorry.

@zakimzf
Copy link

zakimzf commented May 7, 2023

Hi there!

I wanted to see if you had any plans for a tutorial of setting this up.

I want to try self-hosting this so much! I got as far as running the maglit container via Portainer, and even set up a web app in a new Firebase project. I input all the variables that I got from Firebase, but it would just keep saying "Failed to fetch". The url would always be "localhost:3000/". I tried making the .env.local file, but I didn't know where or how to upload it to firebase project.

I guess it must be easy for more experienced techies, but unfortunately I couldn't get it to work.

And of course, I know you're already making a docker image, I just wanted to see how that's coming along. :)

Thank you! I can't wait to be able to try this on my own system :)

@NayamAmarshe Hi, i am facing the same problem, i am so hell-bent on self hosting it and i dont wanna use docker. Please help me with the api route ; it keeps saying "Failed to fetch" error. Thanks, hope to get it resolved soon :)

@NayamAmarshe
Copy link
Owner

Updated the instructions :)

You just need to create the .local.env and build the image.

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

No branches or pull requests

6 participants