code-snippets/infra/ansible/roles/app/tasks/main.yml
Liam Pietralla 36200661cf
Some checks failed
Build, Test & Publish / Build (push) Successful in 18s
Build, Test & Publish / Build and Publish Container Image (push) Successful in 22s
Build, Test & Publish / Deploy to Infrastructure (push) Failing after 2m9s
update registry ansible
2024-09-05 14:31:33 +10:00

31 lines
677 B
YAML

- name: Login to Docker Registry
docker_login:
registry: liamsgit.dev
username: "{{ registry_username }}"
password: "{{ registry_password }}"
- name: Run Code App Container
docker_container:
name: code
image: liamsgit.dev/LiamPietralla/code-snippets
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