initial commit
Some checks failed
Build, Test & Publish / Build and Publish Container Image (push) Has been cancelled
Build, Test & Publish / Deploy to Infrastructure (push) Has been cancelled
Build, Test & Publish / Build (push) Has been cancelled

This commit is contained in:
2024-09-05 13:54:08 +10:00
commit 8ad5845efc
57 changed files with 6046 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
- name: Configure App Server
hosts: app
remote_user: root
become: yes # sudo
roles:
- app

View File

@ -0,0 +1,13 @@
server {
listen 80;
server_name code.liampietralla.com;
location / {
proxy_pass http://localhost:5000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}

View File

@ -0,0 +1,25 @@
- name: Run Code App Container
docker_container:
name: code
image: liamp1/code:latest
pull: yes
ports:
- "5000:80"
restart_policy: unless-stopped
- name: Copy nginx config file
copy:
src: nginx.conf
dest: /etc/nginx/sites-available/code
force: no
- name: Create symlink to code
file:
src: /etc/nginx/sites-available/code
dest: /etc/nginx/sites-enabled/code
state: link
- name: Restart Nginx
service:
name: nginx
state: restarted