Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3752718
D1471.id3773.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D1471.id3773.diff
View Options
diff --git a/pillar/webserver/sites.sls b/pillar/webserver/sites.sls
--- a/pillar/webserver/sites.sls
+++ b/pillar/webserver/sites.sls
@@ -97,6 +97,7 @@
php-fpm: prod
env:
DATASTORE: /var/dataroot/wolfplex
+ CREDENTIAL_PATH_DATASOURCES_SECURITYDATA: /var/dataroot/wolfplex/secrets.json
# -------------------------------------------------------------
# States
@@ -131,6 +132,7 @@
- .org/nasqueron/labs
# Wolfplex Hackerspace
+ - .org/wolfplex/api
- .org/wolfplex/www
# -------------------------------------------------------------
diff --git a/pillar/webserver/wwwroot51.sls b/pillar/webserver/wwwroot51.sls
--- a/pillar/webserver/wwwroot51.sls
+++ b/pillar/webserver/wwwroot51.sls
@@ -26,6 +26,10 @@
user: dereckson
group: dereckson
repository: ssh://vcs@devcentral.nasqueron.org:5022/source/tools.git
+ wolfplex-api:
+ user: dereckson
+ group: dereckson
+ repository: git@github.com:wolfplex/api-www.git
www:
user: dereckson
group: dereckson
diff --git a/roles/webserver-content/org/wolfplex/api.sls b/roles/webserver-content/org/wolfplex/api.sls
new file mode 100644
--- /dev/null
+++ b/roles/webserver-content/org/wolfplex/api.sls
@@ -0,0 +1,43 @@
+# -------------------------------------------------------------
+# Salt — Provision api.wolfplex.org website
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Wolfplex
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if salt['node.has_web_content'](".org/wolfplex/api") %}
+
+# -------------------------------------------------------------
+# Base part
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/wwwroot/wolfplex.org/api:
+ file.recurse:
+ - source: salt://wwwroot/wolfplex.org/api
+ - exclude_pat: E@.git
+ - include_empty: True
+ - clean: False
+ - dir_mode: 755
+ - file_mode: 644
+ - user: web-org-wolfplex-www
+ - group: web
+
+# -------------------------------------------------------------
+# Deployment
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+wolfplex_api_dependencies:
+ cmd.run:
+ - name: composer install
+ - runas: web-org-wolfplex-www
+ - cwd: /var/wwwroot/wolfplex.org/api
+ - creates: /var/wwwroot/wolfplex.org/api/vendor
+
+wolfplex_api_kibaone_accents:
+ cmd.run:
+ - name: make
+ - runas: web-org-wolfplex-www
+ - cwd: /var/wwwroot/wolfplex.org/api/design/kibaone/accents
+ - creates: /var/wwwroot/wolfplex.org/api/design/kibaone/accents/index.json
+
+{% endif %}
diff --git a/roles/webserver-legacy/nginx/files/vhosts/wolfplex.org/api.conf b/roles/webserver-legacy/nginx/files/vhosts/wolfplex.org/api.conf
new file mode 100644
--- /dev/null
+++ b/roles/webserver-legacy/nginx/files/vhosts/wolfplex.org/api.conf
@@ -0,0 +1,117 @@
+# -------------------------------------------------------------
+# Webserver
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Wolfplex
+# Site: api.wolfplex.org
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-legacy/nginx/files/vhosts/wolfplex.org/api.conf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+# -------------------------------------------------------------
+# Production API
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+server {
+ server_name api.wolfplex.org;
+
+ include includes/tls;
+ ssl_certificate /usr/local/etc/letsencrypt/live/api.wolfplex.org/fullchain.pem;
+ ssl_certificate_key /usr/local/etc/letsencrypt/live/api.wolfplex.org/privkey.pem;
+
+ error_log /var/log/www/wolfplex.org/api-error.log;
+ access_log /var/log/www/wolfplex.org/api-access.log;
+
+ root /var/wwwroot/wolfplex.org/api;
+ index index.json index.php index.html;
+
+ location ~ [^/]\.json(/|$) {
+ include includes/cors-open;
+ }
+
+ location ~ \.php$ {
+ fastcgi_pass unix:/var/run/web/www.wolfplex.org/php-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include includes/fastcgi_params;
+ }
+}
+
+# -------------------------------------------------------------
+# Staging API
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+server {
+ server_name api51.wolfplex.org;
+
+ include includes/tls;
+ ssl_certificate /usr/local/etc/letsencrypt/live/api.wolfplex.org/fullchain.pem;
+ ssl_certificate_key /usr/local/etc/letsencrypt/live/api.wolfplex.org/privkey.pem;
+
+ error_log /var/log/www/wolfplex.org/api51-error.log;
+ access_log /var/log/www/wolfplex.org/api51-access.log;
+
+ root /var/51-wwwroot/wolfplex-api;
+ index index.json index.php index.html;
+
+ location ~ [^/]\.json(/|$) {
+ include includes/cors-open;
+ }
+
+ location ~ \.php$ {
+ fastcgi_pass unix:/var/run/web/www.wolfplex.org/php-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include includes/fastcgi_params;
+ }
+}
+
+# -------------------------------------------------------------
+# Redirects for http:// or .be to https://...org
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name api.wolfplex.org api.wolfplex.be;
+
+ include includes/letsencrypt;
+
+ return 301 https://api.wolfplex.org$request_uri;
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name api51.wolfplex.org api51.wolfplex.be;
+
+ include includes/letsencrypt;
+
+ return 301 https://api51.wolfplex.org$request_uri;
+}
+
+server {
+ server_name api.wolfplex.be;
+
+ include includes/tls;
+ ssl_certificate /usr/local/etc/letsencrypt/live/api.wolfplex.org/fullchain.pem;
+ ssl_certificate_key /usr/local/etc/letsencrypt/live/api.wolfplex.org/privkey.pem;
+
+ return 301 https://api.wolfplex.org$request_uri;
+}
+
+server {
+ server_name api51.wolfplex.be;
+
+ include includes/tls;
+ ssl_certificate /usr/local/etc/letsencrypt/live/api.wolfplex.org/fullchain.pem;
+ ssl_certificate_key /usr/local/etc/letsencrypt/live/api.wolfplex.org/privkey.pem;
+
+ return 301 https://api51.wolfplex.org$request_uri;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 20:55 (7 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2251193
Default Alt Text
D1471.id3773.diff (6 KB)
Attached To
Mode
D1471: Deploy https://api.wolfplex.org/
Attached
Detach File
Event Timeline
Log In to Comment