# Docker-compose connect to existing mariadb?

**URL:** <https://forum.gitea.com/t/docker-compose-connect-to-existing-mariadb/7566>\
**Category:** General\
**Created:** [July 13, 2023, 11:58am UTC](https://forum.gitea.com/t/docker-compose-connect-to-existing-mariadb/7566 "2023-07-13T11:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freeware9093](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@Freeware9093](https://forum.gitea.com/u/Freeware9093)\
**Post date:** [July 13, 2023, 11:58am UTC](https://forum.gitea.com/t/docker-compose-connect-to-existing-mariadb/7566/1 "2023-07-13T11:58:48Z")

</div>

Hello @all.

My first test with gitea was great. I know want to install Gitea with my existing mariadb (also in docker).  
The documentation shows a way but creates a new DB

> **[Installation with Docker | Gitea Documentation](https://docs.gitea.com/next/installation/install-with-docker)**
>
> Gitea provides automatically updated Docker images within its Docker Hub organization. It is

Any ideas?  
Thanks

```auto
version: "3"

services:
  gitea:
    image: gitea/gitea
    container_name: gitea_test
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3001:3000"
      - "222:22"
    networks:
      - default
      - web
    labels:
      - traefik.enable=true
      - traefik stuff
networks:
  web:
    external: true

```
