82 lines
2.0 KiB
YAML
82 lines
2.0 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
gitlink:
|
|
external: false
|
|
services:
|
|
mysql:
|
|
image: mysql:5.7.17
|
|
container_name: gitlink-mysql
|
|
command: --sql-mode=""
|
|
restart: always
|
|
volumes:
|
|
- /data/mysql:/var/lib/mysql
|
|
- ./db/init.sql:/docker-entrypoint-initdb.d/forgeplus-init.sql
|
|
ports:
|
|
- "13306:3306"
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=gitea
|
|
- MYSQL_USER=gitea
|
|
- MYSQL_PASSWORD=gitea
|
|
- MYSQL_DATABASE=gitea
|
|
networks:
|
|
- gitlink
|
|
|
|
gitea:
|
|
image: registry.cn-hangzhou.aliyuncs.com/gitlink/gitea:v2
|
|
container_name: gitea
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./gitea/app.ini:/etc/gitea/app.ini
|
|
- ./gitea/start.sh:/start.sh
|
|
- /data/repositories:/data/repositories
|
|
command:
|
|
- 'bash'
|
|
- '/start.sh'
|
|
environment:
|
|
- GITEA_WORK_DIR=/var/lib/gitea
|
|
- GITEA__database__DB_TYPE=mysql
|
|
- GITEA__database__HOST=mysql:3306
|
|
- GITEA__database__NAME=gitea
|
|
- GITEA__database__USER=gitea
|
|
- GITEA__database__PASSWD=gitea
|
|
depends_on:
|
|
- mysql
|
|
networks:
|
|
- gitlink
|
|
|
|
web:
|
|
image: gitlink-ubuntu20.04:latest
|
|
container_name: gitlink-web
|
|
build:
|
|
context: ./
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- GEM_PATH=/usr/local/rvm/gems/ruby-2.4.5:/usr/local/rvm/gems/ruby-2.4.5@global
|
|
- GEM_HOME=/usr/local/rvm/gems/ruby-2.4.5
|
|
- MYSQL_USER=root
|
|
- MYSQL_PWD=gitea
|
|
- MYSQL_HOST=mysql
|
|
- GITEA_USER=root
|
|
- GITEA_PWD=gitlink#2023 #GITEA_PWD from gitea/start.sh
|
|
- GITEA_URL=gitea
|
|
command:
|
|
- 'bash'
|
|
- '/start.sh'
|
|
stdin_open: true
|
|
tty: true
|
|
volumes:
|
|
- ./bin/start.sh:/start.sh
|
|
- /data/webguazai/publicfiles:/home/pdl/forgeplus/public/files
|
|
- /data/webguazai/publicavatars:/home/pdl/forgeplus/public/images/avatars
|
|
- /data/webguazai/files:/home/pdl/forgeplus/files
|
|
ports:
|
|
- "4000:4000"
|
|
depends_on:
|
|
- mysql
|
|
- gitea
|
|
networks:
|
|
- gitlink
|