diff --git a/docker-compose.yml b/docker-compose.yml index 86df988..9736786 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,82 +1,90 @@ -version: '3' -services: - db: - image: mysql:5.7 - 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 - volumes: - - /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} - 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:nightly - 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 - 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 +version: '3' +services: + db: + image: mysql:5.7 + 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 + volumes: + - /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} + 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:nightly + 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 + 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 + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - forgeplus + ports: + - "4000:4000"