Skip to content

一次性全部搭建 #1

@0clickjacking0

Description

@0clickjacking0

这里我写了一个脚本,大牛们轻喷,可以实现一次性全部搭建

import os
import re
path = input('请输入项目的绝对路径:').rstrip(' ')
files = os.listdir(path)
try:
    files.remove('README.md')
    files.remove('install.py')
    files.remove('.git')
except ValueError:
    pass
for i in files:
    with open(path+'/'+i+'/'+'docker_env'+'/'+'docker-compose.yml') as f:
        port = re.search(r"(\d+):80", f.read()).group(1)
    os.chdir(path+'/'+i+'/'+'docker_env')
    result = os.popen('docker-compose build && docker-compose up -d').read()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions