From 875a0efa1e3dc70a11d1a12b7f38b29b6c0314f4 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 23 Jun 2020 11:10:33 +0200 Subject: [PATCH] Use mysql to match our installation --- .envrc.sample | 6 +++--- compose.yml | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.envrc.sample b/.envrc.sample index aaaf079..09173d6 100644 --- a/.envrc.sample +++ b/.envrc.sample @@ -1,14 +1,14 @@ export APP_INI_VERSION=v1 export APP_NAME=gitea -export DB_HOST=postgres:5432 +export DB_HOST=mariadb:3306 export DB_NAME=gitea export DB_PASSWD_VERSION=v1 -export DB_TYPE=postgres +export DB_TYPE=mysql export DB_USER=gitea export DOMAIN=gitea.swarm.autonomic.zone export INTERNAL_TOKEN_VERSION=v1 export JWT_SECRET_VERSION=v1 -export LETS_ENCRYPT_ENV=staging +export LETS_ENCRYPT_ENV=production export SECRET_KEY_VERSION=v1 export SSH_HOST_PORT=2222 export STACK_NAME=gitea diff --git a/compose.yml b/compose.yml index 9ced3e7..9dbc303 100644 --- a/compose.yml +++ b/compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: gitea: - image: "gitea/gitea:1.11.5" + image: "gitea/gitea:1.12.1" configs: - source: app_ini target: /data/gitea/conf/app.ini @@ -47,18 +47,20 @@ services: - "traefik.tcp.routers.gitea-ssh.entrypoints=gitea-ssh" - "traefik.tcp.services.gitea-ssh.loadbalancer.server.port=2222" - postgres: - image: "postgres:12" + mariadb: + image: "mariadb:10.5" + environment: + - MYSQL_DATABASE=gitea + - MYSQL_USER=gitea + - MYSQL_PASSWORD_FILE=/run/secrets/db_passwd + - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_passwd secrets: - db_passwd - environment: - - POSTGRES_USER=gitea - - POSTGRES_DB=gitea - - POSTGRES_PASSWORD_FILE=/run/secrets/db_passwd + - db_root_passwd + volumes: + - "mariadb:/var/lib/mysql" networks: - internal - volumes: - - "db:/var/lib/postgresql/data" networks: internal: @@ -87,4 +89,4 @@ secrets: volumes: git: - db: + mariadb: