0

I've been wrestling with getting my repo set up on Vultr CentOS server, and ran into several issues. In short, I want to know how people get their backend repo up on the CentOS server. Is moving the local repo folder into /root/ on the server correct?

The most recent issue is this:

Running npm run migrate, results in

Error: EACCES: permission denied, scandir '/root/Repofolder/backend' (node:14581) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined. 

now this error

> [email protected] migrate /root/Repofolder/backend > postgrator --config postgrator-config.js [14:24:20] table schemaversion does not exist - creating it. [14:24:20] version of database is: 0 [14:24:20] migrating up to 2 Error: Ident authentication failed for user "postgres" 

I've set up migration with postgrator, postgrator --config postgrator-config.js.

After running into issues with users and permissions while logging into psql and creating database, and editing pg_hba.conf several times, I'm not so sure if this is how others would approach getting their repos up on CentOS (how would I push my local changes with this setup?) I've also ran into issues with using Docker and setting up db_url,

DB_URL: process.env.DB_URL || 'postgresql://postgres@localhost/dbname' 

I actually need to push up my frontend code as well, which I am thinking of getting it up on the same server, with different ports:

80 for frontend, 8000 for express, and 5432 for postgres.

I'm not able to find resources on how people set up their Postgres full stack projects on CentOS.

2
  • do you run this as root or regular user? why the assumption of moving it to /root? you can place it anywhere where your user has access rights.
    – Bart
    CommentedJul 29, 2019 at 9:00
  • @Bart I run as root, [root@vultr ~]#. I don't have specific reason as to why into /root. I just assumed that that's where it would go.
    – Joseph K.
    CommentedJul 29, 2019 at 14:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.