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