pgray64 / gist

Gist, formerly hosted at gist.gg, is basically a Tumblr clone
GNU General Public License v3.0
0 stars 1 forks source link

Documentation isn't clear enough #1

Open mackiexx opened 1 year ago

mackiexx commented 1 year ago

Hello, the documentation to install this isn't clear enough. Please is it possible to get clear doc on how to install this?

pgray64 commented 1 year ago

Hi, thanks for checking out the project. I will update the docs. If the steps under setup of the Readme are not followed, it won't work for sure.

mackiexx commented 1 year ago

Hi, thanks for checking out the project. I will update the docs. If the steps under setup of the Readme are not followed, it won't work for sure.

For some reason, trying to import the setup.sql file to postgrel db doesn't work

ERROR:  relation "post" does not exist
ERROR:  relation "post" does not exist
ERROR:  relation "post" does not exist
ERROR:  relation "post" does not exist
ERROR:  relation "postcomment" does not exist
ERROR:  relation "post" does not exist
NOTICE:  identifier "ux_user_followed__user_followed_user_user_followed_user_followed_user" will be truncated to "ux_user_followed__user_followed_user_user_followed_user_followe"
ERROR:  relation "user_followed__user_followed_user" does not exist
ERROR:  relation "user_followed__user_followed_user" does not exist
ERROR:  relation "user_followed__user_followed_user" does not exist
ERROR:  relation "postreport" does not exist
ERROR:  relation "post" does not exist
ERROR:  relation "postreport" does not exist
ERROR:  relation "postreport" does not exist
ERROR:  relation "user" does not exist
ERROR:  relation "user" does not exist

Then i tried building with docker, it was successful, but no instruction on how to run the project on docker, if nginx is needed. I finally succeeded in deploying the staging part but then there is 500 error for APi/v1/

pgray64 commented 1 year ago

Setup.sql needs to be run after the first successful run of the nodejs backend- the backend scaffolds all the tables on first run. Setup.sql is just doing some optimizations

pgray64 commented 1 year ago

I might make a public docker image so you can just pull it

mackiexx commented 1 year ago

Setup.sql needs to be run after the first successful run of the nodejs backend- the backend scaffolds all the tables on first run. Setup.sql is just doing some optimizations

I am even more confused. nodejs backend? this is not in the readme. i built with the dockerfile, setup my database, added the link to database in production.js and datastores.js and that's it. going to my website doesn't show anything and checking my database after dockerbuild, database is still empty.

One question please, if i build with docker, do i need to run it again with sails? or i am suppose to use one of the both?

pgray64 commented 1 year ago

Ah sorry, yeah you don't have to care about any nodejs details if your docker image builds properly - just running the docker image would make the sails app start and run its db scaffolding.

The most likely issue is that you don't have some needed config keys set - there are a lot that are needed. You'll need to run the docker image with required environment variables as well.

Those things are poorly documented at the moment. My apologies.

mackiexx commented 1 year ago

Ah sorry, yeah you don't have to care about any nodejs details if your docker image builds properly - just running the docker image would make the sails app start and run its db scaffolding.

The most likely issue is that you don't have some needed config keys set - there are a lot that are needed. You'll need to run the docker image with required environment variables as well.

Those things are poorly documented at the moment. My apologies.

Anytime you are less busy, please do update the documentation. Thank you

pgray64 commented 1 year ago

@mackiexx Wanted to give you an update. So there is a good chance you did everything right. When I follow my own instructions, the server process is failing to start due to an issue with one of its dependencies being updated and not supporting Docker Alpine's use of musl instead of GlibC.

What this means is things should work fine if you run it without docker, so after an npm install:

export sails_datastores__default__url="postgresql://CONSTRING_HERE" && \
export sails_custom__sendgridSecret="SECRET_HERE" && \
export sails_session__url=redis://127.0.0.1:6379/0 && \
export sails_custom__s3Key="KEY_HERE" && \
export sails_custom__s3Secret="SECRET_HERE" && \
sails lift

What I need to do is fix the docker build to not use Alpine.