Giter Club home page Giter Club logo

Comments (2)

codingmatty avatar codingmatty commented on July 22, 2024

If you aren't using docker-compose, you can just set DATABASE_URL and it should work as expected.

from linkwarden.

coreyaboy avatar coreyaboy commented on July 22, 2024

@fantibaer I just went through this a few minutes ago, so it's fresh in my mind. Thought I would contribute in a little more detail in case you or the next person that Google brings here has the same skill level I do (I.e.: need a little more guidance than most)

I'm assuming that you are using the docker install method. If you are not, I'm too novice to be any help.

In my compose.yaml file, I commented out the existing line for DATABASE_URL and added a new line immediately after it as follows.
- DATABASE_URL=${DATABASE_URL}

And in my .env file, using the provided sample .env file, I filled out line 6 as follows.
DATABASE_URL=postgresql://username:[email protected]:5432
Adjusting to use the username, password, and IP address for your database server, obv.

Over on my Postgres server, I used pgAdmin to create a new user, and after some trial and error figured out that I needed to give that user the following privileges.
image

And that is the sum total of everything I know about setting up a manual database install. You now know everything I know. Maybe a look at my .yaml and .env files for linkwarden, postgres and pgadmin would help you? I'll be pasting those in as marked up screen shots below because a decade of meme wars on social media has rotted my brain I guess.

image

image

image

And one last little thing. If you are currently installing a stand alone postgres server via docker as I am, you will run into one really stupid permission problem when setting up the pgAdmin container. The pgAdmin devs have set the UID and GID of their container's internal user as 5050 and the best I can tell, the reason they did it was to make the UID:GID match the IP port that pgAdmin uses. The result is that if you simply follow the docker install guide, you will end up with a "Permission denied: '/var/lib/pgadmin/sessions'" error getting in your way.

I found this being discussed in several places on the internet, including their github at laradock/laradock#2552

The fix is to chown -R 5050:5050 whatever folder on the host system you are keeping the container's persistent files at. In my case, I put my compose.yaml file at /opt/stacks/pgadmin/compose.yaml and as this part of my yaml file

volumes: - ./data:/var/lib/pgadmin

The persistant data is in a subfolder, at /opt/stacks/pgadmin/data/

So on my host system sudu chown -R 5050:5050 /opt/stacks/pgadmin/data/ got me all sorted out.

I don't really get why it has to be this way, but I also don't know what's going on in their development environment so my criticism is kinda unqualified. Anyways, I'm going to stop talking and hang up now.

from linkwarden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.