Move Gitea DB to host
This commit is contained in:
parent
642981eb0e
commit
1f7ed88dfd
|
@ -1,14 +1,4 @@
|
||||||
USER_UID=1001
|
USER_UID=1001
|
||||||
USER_GID=1001
|
USER_GID=1001
|
||||||
DB_TYPE=mysql
|
|
||||||
DB_PORT=3306
|
|
||||||
INSTALL_LOCK=true
|
|
||||||
SECRET_KEY={{ gitea_secret_key }}
|
SECRET_KEY={{ gitea_secret_key }}
|
||||||
DISABLE_REGISTRATION=true
|
|
||||||
|
|
||||||
APP_DOMAIN=git.2li.ch
|
|
||||||
|
|
||||||
MYSQL_ROOT_PASSWORD={{ gitea_mysql_root_password }}
|
|
||||||
MYSQL_PASSWORD={{ gitea_mysql_password }}
|
MYSQL_PASSWORD={{ gitea_mysql_password }}
|
||||||
MYSQL_DATABASE=giteadb
|
|
||||||
MYSQL_USER=gitea
|
|
||||||
|
|
|
@ -6,37 +6,24 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- USER_UID
|
- USER_UID
|
||||||
- USER_GID
|
- USER_GID
|
||||||
- DB_TYPE
|
- "DB_TYPE=mysql"
|
||||||
- "DB_HOST=db:${DB_PORT}"
|
- "DB_HOST=host.docker.internal:3306"
|
||||||
- "DB_NAME=${MYSQL_DATABASE}"
|
- "DB_NAME=giteadb"
|
||||||
- "DB_USER=${MYSQL_USER}"
|
- "DB_USER=gitea"
|
||||||
- "DB_PASSWD=${MYSQL_PASSWORD}"
|
- DB_PASSWD
|
||||||
- "ROOT_URL=${APP_DOMAIN}"
|
- "ROOT_URL=git.2li.ch"
|
||||||
- INSTALL_LOCK=true
|
- "INSTALL_LOCK=true"
|
||||||
- SECRET_KEY
|
- SECRET_KEY
|
||||||
- DISABLE_REGISTRATION
|
- "DISABLE_REGISTRATION=true"
|
||||||
volumes:
|
volumes:
|
||||||
- gitea_data:/data
|
- gitea_data:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- 2222:22
|
- "2222:22"
|
||||||
- 8080:3000
|
- "8080:3000"
|
||||||
links:
|
extra_hosts:
|
||||||
- db:db
|
- "host.docker.internal:host-gateway"
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
db:
|
|
||||||
image: mariadb:10.6-focal
|
|
||||||
volumes:
|
|
||||||
- ./db:/var/lib/mysql
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD
|
|
||||||
- MYSQL_PASSWORD
|
|
||||||
- MYSQL_DATABASE
|
|
||||||
- MYSQL_USER
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Reference in New Issue