remove old conf before generation, dynamic DNS for PHP and reverse proxy and swarm fixes in quickstart guide

This commit is contained in:
florian
2021-08-14 20:52:17 +02:00
parent 3cedc0ae13
commit 0be1da18a6
6 changed files with 25 additions and 14 deletions

View File

@@ -50,10 +50,13 @@ if __name__ == "__main__" :
configurator.load_variables(variables)
config = configurator.get_config()
# TODO : find a proper way to remove old sites
env_list = glob.glob(args.output + "/**/*.env", recursive=True)
for env in env_list :
os.remove(env)
# Remove old files
files = glob.glob(args.output + "/*")
for file in files :
if file.endswith(".conf") and os.path.isfile(file) :
os.remove(file)
elif os.path.isdir(file) :
shutil.rmtree(file, ignore_errors=False)
# Generate the files from templates and config
templator = Templator(config, args.templates, args.output, args.target)