# Gitea docker-compose local db

**URL:** <https://forum.gitea.com/t/gitea-docker-compose-local-db/3274>\
**Category:** General\
**Created:** [May 15, 2021, 7:22pm UTC](https://forum.gitea.com/t/gitea-docker-compose-local-db/3274 "2021-05-15T19:22:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LairdTurner](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@LairdTurner](https://forum.gitea.com/u/LairdTurner)\
**Post date:** [May 15, 2021, 7:22pm UTC](https://forum.gitea.com/t/gitea-docker-compose-local-db/3274/1 "2021-05-15T19:22:36Z")

</div>

I want to use Gitea in combination with docker-compose.  
For that I’ve made a docker-compose.yml-file.  
But I don’t understand how I can use my local mariadb.  
I don’t using iptables, I’m using ufw on a Ubuntu 20.04 machine.

Any idea?  
Must I change some settings on the docker side.  
I’m fairly new to docker.

kind regards

```
René

```

---

<div class="post-metadata">

**Author:** ![bak](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@bak](https://forum.gitea.com/u/bak)\
**Post date:** [May 18, 2021, 10:07pm UTC](https://forum.gitea.com/t/gitea-docker-compose-local-db/3274/2 "2021-05-18T22:07:36Z")

</div>

I have my gitea docker setup on GitHub:

> **[ben-kenney/docker-services](https://github.com/ben-kenney/docker-services/tree/master/gitea)**
>
> master/gitea

I’m using postresql though, but if you need to use MySQL then you would need to edit the docker-compose.yml file from what I have.

Also note that this configuration is using the latest gitea version, you might want to pin to a specific version.
