forgeplus/docker-compose.yml

82 lines
2.0 KiB
YAML
Raw Permalink Normal View History

2020-03-09 00:40:16 +08:00
version: '3'
2023-05-24 17:50:26 +08:00
networks:
gitlink:
external: false
2020-03-09 00:40:16 +08:00
services:
mysql:
image: mysql:5.7.17
2023-05-29 18:18:00 +08:00
container_name: gitlink-mysql
2020-03-09 00:40:16 +08:00
command: --sql-mode=""
restart: always
volumes:
2023-05-29 18:18:00 +08:00
- /data/mysql:/var/lib/mysql
- ./db/init.sql:/docker-entrypoint-initdb.d/forgeplus-init.sql
2020-03-09 00:40:16 +08:00
ports:
2023-05-24 17:50:26 +08:00
- "13306:3306"
2020-03-09 00:40:16 +08:00
environment:
2023-05-24 17:50:26 +08:00
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitlink
2020-03-09 00:40:16 +08:00
2023-05-24 17:50:26 +08:00
gitea:
image: registry.cn-hangzhou.aliyuncs.com/gitlink/gitea:v2
2023-05-24 17:50:26 +08:00
container_name: gitea
2020-03-09 00:40:16 +08:00
restart: always
ports:
2023-05-24 17:50:26 +08:00
- "3000:3000"
2020-03-09 00:40:16 +08:00
volumes:
2023-05-24 17:50:26 +08:00
- ./gitea/app.ini:/etc/gitea/app.ini
- ./gitea/start.sh:/start.sh
- /data/repositories:/data/repositories
command:
2023-05-25 13:58:24 +08:00
- 'bash'
- '/start.sh'
2023-05-24 17:50:26 +08:00
environment:
2023-05-29 16:50:24 +08:00
- GITEA_WORK_DIR=/var/lib/gitea
2023-05-24 17:50:26 +08:00
- 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
2020-03-09 00:40:16 +08:00
web:
2023-05-24 17:50:26 +08:00
image: gitlink-ubuntu20.04:latest
2023-05-29 18:18:00 +08:00
container_name: gitlink-web
2022-09-02 11:15:35 +08:00
build:
2023-05-24 18:28:12 +08:00
context: ./
2022-09-02 11:15:35 +08:00
dockerfile: Dockerfile
2023-05-24 17:50:26 +08:00
environment:
2023-05-29 16:50:24 +08:00
- 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
2023-05-24 17:50:26 +08:00
- MYSQL_USER=root
- MYSQL_PWD=gitea
- MYSQL_HOST=mysql
- GITEA_USER=root
2023-05-25 13:58:24 +08:00
- GITEA_PWD=gitlink#2023 #GITEA_PWD from gitea/start.sh
2023-05-24 17:50:26 +08:00
- GITEA_URL=gitea
2023-05-25 11:33:29 +08:00
command:
2023-05-25 14:06:44 +08:00
- 'bash'
- '/start.sh'
2020-03-09 00:40:16 +08:00
stdin_open: true
tty: true
2023-05-25 14:06:44 +08:00
volumes:
- ./bin/start.sh:/start.sh
2023-05-29 18:18:00 +08:00
- /data/webguazai/publicfiles:/home/pdl/forgeplus/public/files
- /data/webguazai/publicavatars:/home/pdl/forgeplus/public/images/avatars
- /data/webguazai/files:/home/pdl/forgeplus/files
2020-03-09 00:40:16 +08:00
ports:
- "4000:4000"
depends_on:
- mysql
2023-05-24 17:50:26 +08:00
- gitea
2023-05-24 18:28:12 +08:00
networks:
- gitlink