Merge pull request #65 from svc-design/codex/update-openresty-roles-configuration

feat: ensure artifact vhost root permissions
This commit is contained in:
shenlan 2025-08-19 17:57:56 +08:00 committed by GitHub
commit 9bcb181ec1
3 changed files with 11 additions and 0 deletions

View File

@ -16,6 +16,7 @@
- cn-artifact.svc.plus
ssl_certificate: /etc/ssl/svc.plus.pem
ssl_certificate_key: /etc/ssl/svc.plus.rsa.key
root: /data/update-server
type: artifact
roles:
- roles/vhosts/common/

View File

@ -47,6 +47,15 @@
loop: "{{ vhosts | default([]) }}"
notify: Restart OpenResty
- name: Ensure artifact root directories exist
file:
path: "{{ item.root }}"
state: directory
owner: www-data
group: www-data
mode: "0755"
loop: "{{ vhosts | default([]) | selectattr('type', 'equalto', 'artifact') | selectattr('root', 'defined') | list }}"
- name: Enable and start OpenResty
systemd:
name: openresty

View File

@ -1,4 +1,5 @@
worker_processes auto;
user www-data;
events {
worker_connections 1024;