Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3766459
D3343.id8623.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D3343.id8623.diff
View Options
diff --git a/UIDs b/UIDs
--- a/UIDs
+++ b/UIDs
@@ -8,3 +8,6 @@
9001 salt
9002 deploy
8900 zr LEGACY
+
+# Web app
+12001 web-org-nasqueron-mail-admin
diff --git a/pillar/paas/alkane/hervil/main.sls b/pillar/paas/alkane/hervil/main.sls
new file mode 100644
--- /dev/null
+++ b/pillar/paas/alkane/hervil/main.sls
@@ -0,0 +1,34 @@
+# -------------------------------------------------------------
+# Salt — PaaS Alkane :: PHP and static sites [development]
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Site: https://admin.mail.nasqueron.org/
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# PHP sites
+#
+# Username must be unique and use max 31 characters.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+web_domains:
+ nasqueron:
+ - nasqueron.org
+
+nginx_vhosts:
+ nasqueron.org:
+ - admin.mail
+
+php_fpm_instances:
+ # PHP current version, generally installed as package/port
+ prod:
+ command: /usr/local/sbin/php-fpm
+
+web_php_sites:
+ admin.mail.nasqueron.org:
+ domain: nasqueron.org
+ subdomain: admin.mail
+ user: web-org-nasqueron-mail-admin
+ uid: 12001
+ php-fpm: prod
diff --git a/pillar/webserver/hervil/content.sls b/pillar/webserver/hervil/content.sls
new file mode 100644
--- /dev/null
+++ b/pillar/webserver/hervil/content.sls
@@ -0,0 +1,10 @@
+# -------------------------------------------------------------
+# Salt — Sites to provision
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+web_content_sls:
+ - .org/nasqueron/mail
+ - .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,44 @@
+# -------------------------------------------------------------
+# Webserver
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Site: mail.nasqueron.org
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/admin.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;
+
+ 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,51 @@
+# -------------------------------------------------------------
+# Salt — Provision admin.mail.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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 18:21 (15 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258640
Default Alt Text
D3343.id8623.diff (8 KB)
Attached To
Mode
D3343: Init alkane and webserver-content to install VimbAdmin
Attached
Detach File
Event Timeline
Log In to Comment