Page MenuHomeDevCentral

D3343.id8605.diff
No OneTemporary

D3343.id8605.diff

diff --git a/UIDs b/UIDs
--- a/UIDs
+++ b/UIDs
@@ -8,3 +8,7 @@
9001 salt
9002 deploy
8900 zr LEGACY
+
+# Web app
+12000 web-org-nasqueron-mail
+12001 web-org-nasqueron-mail-admin
diff --git a/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/admin.mail.conf b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/admin.mail.conf
new file mode 100644
--- /dev/null
+++ b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/admin.mail.conf
@@ -0,0 +1,45 @@
+# -------------------------------------------------------------
+# Webserver
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Site: mail.nasqueron.org
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/mail.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>
+
+# -------------------------------------------------------------
+# Main site
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name admin.mail.nasqueron.org;
+
+ include includes/tls;
+ ssl_certificate /usr/local/etc/letsencrypt/live/admin.mail.nasqueron.org/fullchain.pem;
+ ssl_certificate_key /usr/local/etc/letsencrypt/live/admin.mail.nasqueron.org/privkey.pem;
+
+ include includes/letsencrypt;
+
+ root /var/wwwroot/nasqueron.org/admin.mail/public;
+ index index.html index.php index.htm;
+
+ location / {
+ try_files $uri $uri/ /index.php;
+ }
+
+ location ~ \.php$ {
+ fastcgi_pass unix:/var/run/web/admin.mail.nasqueron.org/php-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME /var/wwwroot/nasqueron.org/admin.mail/public/index.php;
+ include includes/fastcgi;
+ }
+}
diff --git a/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/init.sh b/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/init.sh
new file mode 100644
--- /dev/null
+++ b/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/init.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# Nasqueron PaaS :: Alkane :: Recipe for deployment
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/init.sh
+# Action: init
+# -------------------------------------------------------------
+#
+# <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>
+
+set -e
+
+git clone https://github.com/opensolutions/ViMbAdmin.git "$ALKANE_SITE_PATH"
+cd "$ALKANE_SITE_PATH"
+git remote add nasqueron https://github.com/dereckson/ViMbAdmin.git
+git fetch --all
+git checkout nasqueron/production -b production
+
+composer install --prefer-dist --no-dev
diff --git a/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/update.sh b/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/update.sh
new file mode 100644
--- /dev/null
+++ b/roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/update.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# Nasqueron PaaS :: Alkane :: Recipe for deployment
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/update.sh
+# Action: update
+# -------------------------------------------------------------
+#
+# <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>
+
+set -e
+
+cd "$ALKANE_SITE_PATH"
+
+# -------------------------------------------------------------
+# Update git
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+
+if [ "$CURRENT_BRANCH" != "production" ]; then
+ echo "Code isn't in the production branch." >&2
+ exit 1
+fi
+
+git fetch --all
+git diff-index --quiet HEAD && git pull --rebase
+
+# -------------------------------------------------------------
+# Update composer
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+composer update --prefer-dist --no-dev
diff --git a/roles/webserver-content/org/nasqueron/mail_admin.sls b/roles/webserver-content/org/nasqueron/mail_admin.sls
new file mode 100644
--- /dev/null
+++ b/roles/webserver-content/org/nasqueron/mail_admin.sls
@@ -0,0 +1,53 @@
+# -------------------------------------------------------------
+# Salt — Provision rain.nasqueron.org website
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Base directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/wwwroot/nasqueron.org/admin.mail:
+ file.directory:
+ - user: deploy
+ - group: wheel
+ - dir_mode: 755
+
+# -------------------------------------------------------------
+# Deploy mail
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/usr/local/libexec/alkane/admin.mail.nasqueron.org:
+ file.directory:
+ - user: root
+ - group: web
+ - dir_mode: 755
+
+
+/usr/local/libexec/alkane/admin.mail.nasqueron.org/init:
+ file.managed:
+ - source: salt://roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/init.sh
+ - mode: 755
+
+/usr/local/libexec/alkane/admin.mail.nasqueron.org/update:
+ file.managed:
+ - source: salt://roles/webserver-content/org/nasqueron/files/recipes/admin.mail.nasqueron.org/update.sh
+ - mode: 755
+
+www_admin_mail_build:
+ cmd.run:
+ - name: alkane deploy admin.mail.nasqueron.org
+ - runas: deploy
+
+/var/wwwroot/nasqueron.org/admin.mail/var:
+ file.directory:
+ - user: web-org-nasqueron-mail-admin
+ - group: web
+ - dir_mode: 711
+ - recurse:
+ - user
+ - group
+ - mode
+

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 01:06 (11 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2311527
Default Alt Text
D3343.id8605.diff (6 KB)

Event Timeline