100 lines
2.7 KiB
YAML
100 lines
2.7 KiB
YAML
version: '3'
|
|
services:
|
|
db:
|
|
image: mysql:8.4.4
|
|
container_name: mysql-public
|
|
restart: always
|
|
command: |
|
|
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_flush_log_at_trx_commit=2 --max_connections=3000 --mysql_native_password=ON
|
|
volumes:
|
|
- ./00-mysql-user-pwd.sql:/docker-entrypoint-initdb.d/1.sql
|
|
- /data/gitlink/packages/00-db/mysql-init:/docker-entrypoint-initdb.d
|
|
- /data/mysql/conf:/etc/mysql/conf.d
|
|
- /data/mysql/logs:/logs
|
|
- /data/mysql/data:/var/lib/mysql
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
|
|
healthcheck:
|
|
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
|
|
interval: 30s
|
|
timeout: 2s
|
|
retries: 1
|
|
ports:
|
|
- 3306:3306
|
|
networks:
|
|
- default
|
|
redis:
|
|
container_name: redis
|
|
image: redis:alpine
|
|
restart: always
|
|
networks:
|
|
- default
|
|
|
|
gitea_hat:
|
|
container_name: gitea_hat
|
|
restart: always
|
|
image: gitea_hat-app
|
|
volumes:
|
|
- /data/gitlink/packages/01-gitea/gitea_hat:/usr/local/bin/gitea
|
|
- /data/gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
GOPROXY: https://goproxy.cn,direct
|
|
networks:
|
|
- default
|
|
ports:
|
|
- "3000:3000"
|
|
- "2022:22"
|
|
depends_on:
|
|
- runner
|
|
- db
|
|
runner:
|
|
# container_name: my_runner
|
|
image: gitea/act_runner:latest
|
|
restart: always
|
|
scale: 5
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:rw
|
|
environment:
|
|
GITEA_INSTANCE_URL: 'http://${SERVER_IP}:3000' # 输入服务地址
|
|
GITEA_RUNNER_REGISTRATION_TOKEN: 'XPnJXquS0rhGhK99t2HAfCQAcH200uZLmgWRFwag' # 需要gitea中runner token
|
|
forgeplus:
|
|
env_file: .env
|
|
container_name: forgeplus
|
|
#scale: 5
|
|
restart: always
|
|
image: forgeplus-app
|
|
volumes:
|
|
- /data/gitlink/packages/02-forgeplus/forgeplus:/var/www/forgeplus
|
|
- /data/gitlink/packages/02-forgeplus/bundle:/usr/local/bundle
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- default
|
|
ports:
|
|
- 4000:4000
|
|
sidekiq:
|
|
env_file: .env
|
|
container_name: sidekiq
|
|
restart: always
|
|
image: forgeplus-sidekiq
|
|
volumes:
|
|
- /data/gitlink/packages/02-forgeplus/forgeplus:/var/www/forgeplus
|
|
- /data/gitlink/packages/02-forgeplus/bundle:/usr/local/bundle
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- default
|
|
# nginx:
|
|
# image: nginx:latest
|
|
# container_name: forge-nginx
|
|
# volumes:
|
|
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
# depends_on:
|
|
# - forgeplus
|
|
# ports:
|
|
# - "4000:4000"
|