sylv / micro

A vanity image host with url shortening, 2fa, videos, and much more.
https://micro.sylo.digital
GNU Affero General Public License v3.0
43 stars 4 forks source link

docker compose databases connection error #6

Closed maxcutie closed 3 years ago

maxcutie commented 3 years ago

currently facing this issue when trying to run docker compose

any ideas how to fix? ;-;

error

sylv commented 3 years ago

Pretty sure your connection URI for postgres is wrong, if you're using the docker-compose file from /examples it should be postgresql://micro:youshallnotpass@postgres/micro. Might also be affected by the outdated docker image because the build is failing but I'll fix that in a minute.

maxcutie commented 3 years ago

ah okay ill try and see if that fixes it

thank you for the fast reply <3

sylv commented 3 years ago

I added some updated installation instructions which should hopefully work. Once the new Docker image is pushed you can try with the new examples and installation instructions if you didn't figure it out.

maxcutie commented 3 years ago

alright i'll give it a look. few you a few dollars on patreon for your help <3

maxcutie commented 3 years ago

everything is looking good but im getting a new error which is confusing me.

i replaced the DATABASE_URL field with "postgresql://micro:youshallnotpass@postgres/micro" but it's still returning this error.

dont know if im retarded or dumb

image image

sylv commented 3 years ago

Ooooh yeah I might have overlooked that. If you're doing the prisma migration try docker-compose run -e DATABASE_URL=postgresql://micro:youshallnotpass@postgres/micro micro prisma db push --preview-feature, that should let it pick up the database URL.

maxcutie commented 3 years ago

I feel so bad spamming you with all this

Error: P1001: Can't reach database server atpostgres:5432`

Please make sure your database server is running at postgres:5432. ERROR: 1 `

sylv commented 3 years ago

If I bothered testing the instructions you wouldn't have to so it's fine. Do docker-compose up -d postgres so the database is running while you run the migration, that should fix it.

maxcutie commented 3 years ago

worked ^_^

ur a lifesaver

sylv commented 3 years ago

epic. if you find other problems open another issue 👈🤠👈