Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pillar/prod/logrotate.sls
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ logrotate:
- postrotate
- /usr/lib/php/php7.4-fpm-reopenlogs
- endscript
php8.1-fpm:
path:
- /var/log/php8.1-fpm.log
config:
- missingok
- notifempty
- sharedscripts
- postrotate
- /usr/lib/php/php8.1-fpm-reopenlogs
- endscript
salt-common:
path:
- /var/log/salt/master
Expand Down
2 changes: 1 addition & 1 deletion pillar/prod/php74.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ php:
cli:
- php7.4-cli
- php7.4-common
xml:
modules:
- php7.4-xml
soap:
- php7.4-soap
Expand Down
129 changes: 0 additions & 129 deletions pillar/prod/php80.sls

This file was deleted.

4 changes: 3 additions & 1 deletion pillar/prod/php81.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ php:
cli:
- php8.1-cli
- php8.1-common
xml:
modules:
- php8.1-xml
- php8.1-soap
- php8.1-bcmath

fpm:
conf: /etc/php/8.1/fpm/php-fpm.conf
Expand Down
4 changes: 2 additions & 2 deletions pillar/prod/supervisor.sls
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ supervisor:
-q /www/opensourcewebsite.org/htdocs/yii cron > runtime/logs/cron.log
numprocs: '1'
directory: '/www/opensourcewebsite.org'
stdout_logfile: '/www/opensourcewebsite.org/htdocs/runtime/logs/cron-stdout.log'
stderr_logfile: '/www/opensourcewebsite.org/htdocs/runtime/logs/cron-stderr.log'
stdout_logfile: '/www/opensourcewebsite.org/logs/cron-stdout.log'
stderr_logfile: '/www/opensourcewebsite.org/logs/cron-stderr.log'
user: 'opensourcewebsite.org'
stopsignal: 'KILL'

Expand Down
3 changes: 3 additions & 0 deletions pillar/prod/users.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ users:
www-data:
groups:
- opensourcewebsite.org
git-auto-deploy:
groups:
- opensourcewebsite.org

opensourcewebsite.org:
fullname: opensourcewebsite org
Expand Down
37 changes: 23 additions & 14 deletions salt/backup/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
backup_dir: {{ pillar['backup_dir'] }}
backup_site_list: {{ pillar['backup_sites'] | join(' ') }}

#backup-mysql:
# cron.present:
# - name: /root/backup_mysql.sh
# - user: root
# - minute: random
# - hour: 1
# - identifier: backup-mysql

backup-mysql:
cron.present:
cron.absent:
- name: /root/backup_mysql.sh
- user: root
- minute: random
- hour: 1
- identifier: backup-mysql

backup-site:
cron.present:
Expand All @@ -35,17 +40,21 @@ backup-site:
- hour: 2
- identifier: backup-site

#{{ pillar['backup_dir'] }}/mysql:
# file.directory:
# - user: root
# - group: root
# - dir_mode: 750
# - file_mode: 640
# - makedirs: True
# - recurse:
# - user
# - group
# - mode

{{ pillar['backup_dir'] }}/mysql:
file.directory:
- user: root
- group: root
- dir_mode: 750
- file_mode: 640
- makedirs: True
- recurse:
- user
- group
- mode
file.absent:
- name: {{ pillar['backup_dir'] }}/mysql

{{ pillar['backup_dir'] }}/sites:
file.directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"http-host": "0.0.0.0",
"http-port": 8005,
"pid-file": "/www/opensourcewebsite.org/tmp/.gitautodeploy.pid",
"ssl-cert": "/etc/git-auto-deploy/cert.pem",

"repositories": [{
"url": "git@github.com:opensourcewebsite-org/opensourcewebsite-org.git",
"url": "https://github.com/opensourcewebsite-org/opensourcewebsite-org.git",
"branch": "master",
"remote": "origin",
"path": "/www/opensourcewebsite.org/htdocs/",
Expand Down
2 changes: 0 additions & 2 deletions salt/packages/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ packages:
- python3.7
- apache2-utils
- php-xdebug
- php7.4-soap
- php7.4-bcmath

#NAME:
# pkg.purged
4 changes: 2 additions & 2 deletions salt/supervisord/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include:

chown_log_file:
file.managed:
- name: /www/opensourcewebsite.org/htdocs/runtime/logs/cron-stdout.log
- name: /www/opensourcewebsite.org/logs/cron-stdout.log
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- mode: 644
Expand All @@ -52,7 +52,7 @@ chown_log_file:

chown_log_file2:
file.managed:
- name: /www/opensourcewebsite.org/htdocs/runtime/logs/cron-stderr.log
- name: /www/opensourcewebsite.org/logs/cron-stderr.log
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- mode: 644
Expand Down
20 changes: 20 additions & 0 deletions salt/users/directory.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/www/opensourcewebsite.org/htdocs/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True

/www/opensourcewebsite.org/logs/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True

/www/opensourcewebsite.org/tmp/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True
Empty file.
Empty file.
Empty file.