添加项目文件。
This commit is contained in:
44
Gitea/gitea/docker-compose.yml
Normal file
44
Gitea/gitea/docker-compose.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
version: "3.4"
|
||||
|
||||
networks:
|
||||
gitea:
|
||||
external:
|
||||
name: nginxdocker_default
|
||||
|
||||
services:
|
||||
server:
|
||||
image: "gitea/gitea:latest"
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- DB_TYPE=mysql
|
||||
- DB_HOST=db:3306
|
||||
- DB_NAME=gitea
|
||||
- DB_USER=gitea
|
||||
- DB_PASSWD=Whynotfight?
|
||||
restart: always
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- ./gitea:/data
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "222:22"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: "mysql/mysql-server"
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=Nowaytohide...
|
||||
- MYSQL_USER=gitea
|
||||
- MYSQL_PASSWORD=Whynotfight?
|
||||
- MYSQL_DATABASE=gitea
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- ./mysql/config/my.cnf:/etc/my.cnf
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
- ./mysql/init:/docker-entrypoint-initdb.d
|
||||
3
Gitea/gitea/grant-permissions.sh
Normal file
3
Gitea/gitea/grant-permissions.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
useradd -M -s /sbin/nologin git
|
||||
chown -R git:git ../gitea
|
||||
13
Gitea/gitea/mysql/config/my.cnf
Normal file
13
Gitea/gitea/mysql/config/my.cnf
Normal file
@@ -0,0 +1,13 @@
|
||||
[mysqld]
|
||||
user=gitea
|
||||
default-authentication-plugin=mysql_native_password
|
||||
skip-name-resolve
|
||||
character-set-client-handshake=0
|
||||
character-set-server=utf8mb4
|
||||
collation-server=utf8mb4_unicode_ci
|
||||
default-time-zone='+8:00'
|
||||
lower_case_table_names=1
|
||||
[client]
|
||||
default-character-set=utf8mb4
|
||||
[mysql]
|
||||
default-character-set=utf8mb4
|
||||
1
Gitea/gitea/mysql/init/init.sql
Normal file
1
Gitea/gitea/mysql/init/init.sql
Normal file
@@ -0,0 +1 @@
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'gitea'@'%' WITH GRANT OPTION;
|
||||
Reference in New Issue
Block a user