changed pass backend port

This commit is contained in:
Actaeus Curabitur 2022-09-06 06:39:02 -05:00
parent 701b84dbac
commit 859ad41131
10 changed files with 2047 additions and 3 deletions
pillars/roles
states/roles/maintain

View file

@ -0,0 +1,5 @@
#note: teampass package is currently broken due to mysql being a required dependency
#will readd if/when the teampass AUR package is fixed
#aur:
# pkgs:
# teampass: []

View file

@ -0,0 +1,10 @@
backup:
pass:
location: /teampass
rsync_user: backups
key: backups_key
host: host.actcur.com
user: http
group: http
fmode: 644
dmode: 700

View file

@ -0,0 +1,9 @@
database:
users:
teampass:
host: pass.actcur.com
databases:
teampass:
teampass:
host: pass.actcur.com
grant: all privileges

View file

@ -2,7 +2,7 @@ nginx:
pass:
auth: 2fa
https:
port: 8080
port: 8000
prot: http
portal:

View file

@ -0,0 +1,3 @@
services:
pass:
php-fpm: []

View file

@ -22,8 +22,8 @@ server {
listen 443;
server_name {{server}}.actcur.com {{wildcard}};
resolver {{ resolver }};
set $backend "{{prot}}://$server_name{%- if port is defined -%}:{{port}}{%- endif -%}";
# resolver {{ resolver }};
set $backend "{{prot}}://127.0.0.1{%- if port is defined -%}:{{port}}{%- endif -%}";
ssl on;
ssl_certificate /etc/nginx/certs/{{server}}.actcur.com/fullchain.pem;

View file

@ -0,0 +1,63 @@
#install teampass - needs to be changed to being built in the aurrepo as soon as Marcin updates the dependencies to not include mysql
teampass_/etc/pacman.conf:
file.append:
- name: /etc/pacman.conf
- source: salt://roles/maintain/pass/temp-repo.conf
install_teampass:
pkg.installed:
- name: teampass
teampass_php-gd:
pkg.installed:
- name: php-gd
teampass_php-fpm:
pkg.installed:
- name: php-fpm
service.running:
- name: php-fpm
- enable: true
- watch:
- file: /etc/php/php.ini
/etc/php/php.ini:
file.managed:
- source: salt://roles/maintain/pass/php.ini
/etc/nginx/conf.d/teampass.conf:
file.managed:
- source: salt://roles/maintain/pass/nginx.conf
#change ownership on directories
"/usr/share/webapps/teampass/includes/config/":
file.directory:
- user: http
- group: http
"/usr/share/webapps/teampass/includes/avatars/":
file.directory:
- user: http
- group: http
"/usr/share/webapps/teampass/includes/libraries/csrfp/libs/":
file.directory:
- user: http
- group: http
"/usr/share/webapps/teampass/includes/libraries/csrfp/js/":
file.directory:
- user: http
- group: http
"/usr/share/webapps/teampass/includes/libraries/csrfp/log/":
file.directory:
- user: http
- group: http
"/teampass":
file.directory:
- user: http
- group: http
- dir_mode: 700
- file_mode: 600
- recurse:
- user
- group
- mode

View file

@ -0,0 +1,21 @@
server {
server_name domain.tld www.domain.tld;
root /usr/share/webapps/teampass;
listen 8080;
location / {
# try to serve file directly, fallback to front controller
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri $document_root$fastcgi_script_name =404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
error_log /var/log/nginx/teampass_error.log;
access_log /var/log/nginx/teampass_access.log;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
[teampass-temp]
SigLevel = Never
Server = http://pkg.actcur.com/$repo/os/$arch