+ Nginx reverse proxy setup

This commit is contained in:
shockrah 2022-01-23 19:16:23 -08:00
parent 0e3b88ff63
commit f6d8a3c55f
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# This file pertains to the Gitea service which is served under the FQDN:
# git.leftcoast.local
# The default port is listed under /vars/main.yml as 3000 as GITEA_PUB_PORT
server {
proxy_pass localhost:3000;
server_name git.leftcoast.local;
}

View File

@ -0,0 +1,6 @@
- name: Restart Nginx
listen: restart-nginx
service:
name: nginx
state: restarted

View File

@ -34,3 +34,27 @@
recurse: yes
owner: "{{STATIC_USER}}"
group: "{{STATIC_USER}}"
- name: Copy Reverse proxy configs
copy:
src: "{{ item.src }}"
dest: /etc/nginx/sites-available/
loop:
- ../files/git.leftcoast.local
- name: Enable Sites
file:
src: /etc/nginx/sites-available/{{item}}
dest: /etc/nginx/sites-enabled/{{item}}
state: link
loop:
- git.leftcoast.local
notify:
- restart-nginx
handlers:
- import_tasks: ../handlers/nginx.yml