45 lines
906 B
YAML
45 lines
906 B
YAML
version: "3.7"
|
|
|
|
services:
|
|
server:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
networks:
|
|
- gitea
|
|
ports:
|
|
- "3001:3000"
|
|
- "222:22"
|
|
depends_on:
|
|
- db
|
|
volumes:
|
|
- ./data:/data
|
|
environment:
|
|
- GITEA__database__DB_TYPE=mysql
|
|
- GITEA__database__HOST=db:3306
|
|
- GITEA__database__NAME=gitea
|
|
- GITEA__database__USER=gitea
|
|
- GITEA__database__PASSWD=${DB_PASSWD}
|
|
db:
|
|
image: mysql:8
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./mysql:/var/lib/mysql
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_passwd
|
|
- MYSQL_USER=gitea
|
|
- MYSQL_PASSWORD_FILE=/run/secrets/db_passwd
|
|
- MYSQL_DATABASE=gitea
|
|
secrets:
|
|
- db_passwd
|
|
- db_root_passwd
|
|
|
|
networks:
|
|
gitea:
|
|
|
|
secrets:
|
|
db_passwd:
|
|
file: .passwd/mysql_passwd
|
|
db_root_passwd:
|
|
file: .passwd/mysql_root_passwd
|