+ Nginx reverse proxy setup
This commit is contained in:
parent
0e3b88ff63
commit
f6d8a3c55f
8
docker-host/setup/files/git.leftcoast.local
Normal file
8
docker-host/setup/files/git.leftcoast.local
Normal 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;
|
||||
}
|
6
docker-host/setup/handlers/nginx.yml
Normal file
6
docker-host/setup/handlers/nginx.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Restart Nginx
|
||||
listen: restart-nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user