Back

[SOLVED] DB development Tool connect to MariaDB Docker

  • 0
  • Self Hosted
  • Tools
  • Web
Bouahaza
29 May, 2023, 09:13

Possible yes. Try to localte docker-compose created by docker run

TL;DR
The issue was solved by using a manual docker-compose setup instead of trying to expose the DB port on a pre-built docker image. It was also suggested to use roles as teams and implement custom functions to manage permissions and access collections. For accessing the database and showing all available collections, it was recommended to create a custom function and modify the .env and docker-compose.yml files accordingly. The solution involved running `docker-compose up` and making the necessary modifications to the files.
Bouahaza
29 May, 2023, 09:13

Or directly use docker compose

toyman114
29 May, 2023, 09:14

Okay, so if I'll use docker compose I should pull the project locally right?

Bouahaza
29 May, 2023, 09:14

Save this file on docker-compose.yml : https://appwrite.io/install/compose

Bouahaza
29 May, 2023, 09:15

On same folder, create .env file with : https://appwrite.io/install/env

Bouahaza
29 May, 2023, 09:16

Remove existing docker config

TypeScript
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker image prune -f
docker system prune -a
Bouahaza
29 May, 2023, 09:16

Modify this on docker-compose.yml

Bouahaza
29 May, 2023, 09:16

And run docker compose up

toyman114
29 May, 2023, 09:17

Awesome! I'll do that

Bouahaza
29 May, 2023, 09:17

On .env, you need to adapt it (domain for ex)

toyman114
29 May, 2023, 11:52

Hi, Just another question. I want to access a database and show all the collections available and someone suggested that using custom function, so I tried to read the docs but I cant figure it out on my own ^_^

toyman114
29 May, 2023, 11:53

Is there better example I can follow 🙂

Bouahaza
29 May, 2023, 12:02

As it's a new suject, better to create a new post. Just inc ase : https://appwrite.io/docs/server/databases?sdk=nodejs-default#databasesListCollections

toyman114
29 May, 2023, 12:09

Thanks! its on server tabs

toyman114
29 May, 2023, 12:10

I think this will, just need to find a way to securely implement it together with the UI

Bouahaza
29 May, 2023, 12:10

You can't list collection as client

Bouahaza
29 May, 2023, 12:10

This is why you need to create function

Bouahaza
29 May, 2023, 12:10

And with function you can manage permission, and call listCollections with api key

toyman114
29 May, 2023, 12:11

Yes, but the application Im trying to create is a client app with user specific roles

Bouahaza
29 May, 2023, 12:11

Try to implement "roles" as teams

Bouahaza
29 May, 2023, 12:12

If you achieve connection via DB tool, don't forgot to add [SOLVED] at begin of your post title

toyman114
29 May, 2023, 12:12

Sure, im currently exploring all possibilities on appwrite

toyman114
29 May, 2023, 12:13

Yes, I can set this as solve for now because I found out that there's no way I can expose DB port that runs on pre-built docker image but instead manually docker-compose will do

toyman114
29 May, 2023, 12:17

[SOLVED]DB development Tool connect to MariaDB Docker

toyman114
29 May, 2023, 12:17

[SOLVED] DB development Tool connect to MariaDB Docker

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more