diff --git a/docker-host/setup/files/git.leftcoast.local b/docker-host/setup/files/git.leftcoast.local new file mode 100644 index 0000000..bbdf8e0 --- /dev/null +++ b/docker-host/setup/files/git.leftcoast.local @@ -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; +} diff --git a/docker-host/setup/handlers/nginx.yml b/docker-host/setup/handlers/nginx.yml new file mode 100644 index 0000000..7fc2aa9 --- /dev/null +++ b/docker-host/setup/handlers/nginx.yml @@ -0,0 +1,6 @@ +- name: Restart Nginx + listen: restart-nginx + service: + name: nginx + state: restarted + diff --git a/docker-host/setup/tasks/nginx.yml b/docker-host/setup/tasks/nginx.yml index 9de99fd..f84d725 100644 --- a/docker-host/setup/tasks/nginx.yml +++ b/docker-host/setup/tasks/nginx.yml @@ -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 + + + +