Explorar el Código

README.md

tags/v1.0.0
Robin Thoni hace 7 años
padre
commit
32483b2243
Se han modificado 2 ficheros con 40 adiciones y 5 borrados
  1. 35
    0
      README.md
  2. 5
    5
      setup.py

+ 35
- 0
README.md Ver fichero

@@ -81,6 +81,41 @@ Configuration keys:
81 81
  - letsencryptDir: The root directory used by letsencrypt (certbot)
82 82
  - certDir: Where to put symlink to certificate files
83 83
 
84
+Hooks
85
+-----
86
+
87
+There's two types of hooks:
88
+ - Certificate: Cert hooks are triggered when creating a site using the --site-create flag. Hooks are executed once per site, before and after creation.
89
+ - Site: Site hooks are triggered when requesting/renewing a certificate using the flags --cert-request and --cert-renew. Hooks are executed once per certificate, before and after request/renew.
90
+
91
+Hooks must be enabled/disabled using `--hook-enable` and `--hook-disable` arguments.
92
+
93
+Some hooks are provided:
94
+ - Certificates
95
+    - 000-print: Print request/renewal details, before request/renewal.
96
+    - 100-mkwebroot: make directory for the letsencrypt challenge, to be used with `extra/apache/sitegen.conf`, before request/renewal.
97
+    - 200-reload: Reload apache daemon, after request/renewal.
98
+ - Sites
99
+    - 000-print: Print site details, before site creation.
100
+    - 100-sitegen-cert-request: Request a letsencrypt certificate if SSL is detected in site configuration files, after site creation.
101
+    - 200-chown: Change owner of the document root to the user running the command, after site creation.
102
+    - 300-a2ensite: Enable site in apache, after site creation.
103
+    - 400-reload: Reload apache daemon, after site creation.
104
+
105
+
106
+Templates
107
+---------
108
+
109
+Templates are used to generate apache site configuration. They are split in two files:
110
+ - Transport configuration (*.conf): These files setup the http and/or https configuration to be used.
111
+ - Site configuration (*.include): These files setup the site configuration, as document root, server name, aliases, location, etc. They are included ine the .conf files using Include directive.
112
+
113
+Default templates are default.include and https.conf. Templates can be specified when creating site by using the following syntax:
114
+```
115
+sitegen --site-create www.example.com:docker.rhttps
116
+```
117
+Where `www.example.com` is the site to create, `docker` is the `docker.include` template and `rhttps` is the `rhttps.conf` template.
118
+
84 119
 Usage
85 120
 -----
86 121
 

+ 5
- 5
setup.py Ver fichero

@@ -19,7 +19,7 @@ def package_files(directory):
19 19
 
20 20
 setup(
21 21
     name='sitegencli',
22
-    version="1.0.1",
22
+    version="1.0.0",
23 23
 
24 24
     description="CLI tool to build web site configuration",
25 25
     long_description="""\
@@ -68,12 +68,12 @@ Also provide a simpler way to request SSL certificate over certbot""",
68 68
     },
69 69
 
70 70
     data_files=[
71
-        ('/etc/sitegen/hooks-available/cert/', package_files('extra/sitegen/hooks-available/cert/')),
72
-        ('/etc/sitegen/hooks-available/site/', package_files('extra/sitegen/hooks-available/site/')),
73
-        ('/etc/sitegen/templates/', package_files('extra/sitegen/templates/')),
74 71
         ('/etc/bash_completion.d/', ['extra/bash/sitegen']),
75 72
         ('share/sitegen/', ['extra/apache/sitegen.conf']),
76
-        ('etc/sitegen/', ['extra/sitegen/sitegen.json'])
73
+        ('etc/sitegen/', ['extra/sitegen/sitegen.json']),
74
+        ('etc/sitegen/hooks-available/cert/', package_files('extra/sitegen/hooks-available/cert/')),
75
+        ('etc/sitegen/hooks-available/site/', package_files('extra/sitegen/hooks-available/site/')),
76
+        ('etc/sitegen/templates/', package_files('extra/sitegen/templates/'))
77 77
     ],
78 78
 
79 79
     entry_points={

Loading…
Cancelar
Guardar