From d10db3a6ba0430245b7aca38adfa73f63ba5a807 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Tue, 23 Jun 2020 15:16:48 +0700 Subject: [PATCH] Connect gitea to mariadb --- docker-compose.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3068664e..db6d611d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,10 +14,15 @@ services: gitea: container_name: "khuedoan_gitea" build: ./gitea/ + environment: + DB_TYPE: "mysql" + DB_HOST: "mariadb:3306" + DB_USER: "root" + DB_PASSWD: $MYSQL_ROOT_PASSWORD + DB_NAME: "gitea" mariadb: container_name: "khuedoan_mariadb" build: ./mariadb/ environment: - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - ports: - - "3306:3306" + MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD + MYSQL_DATABASE: "gitea"