Update deployer.yml

This commit is contained in:
Matte 2024-04-18 17:11:37 +03:00
parent bd3ca45f1a
commit 32cfff9039

View File

@ -147,49 +147,6 @@
tags: tags:
- nginx - nginx
- name: "Deployer - Backend - Git Operations"
git:
repo: https://github.com/MetroHege/MPP-Backend.git
dest: /root/backend
version: main
register: deployerTask521
- name: "Deployer - Backend - Build Image"
containers.podman.podman_image:
name: mpp/backend
tag: latest
path: /root/backend
build:
file: Dockerfile
format: docker
cache: on
force: on
become: on
become_user: root
register: deployerTask522
when:
- (deployerTask521 is defined and deployerTask521.changed) or deployerTask521 is undefined
tags:
- backend
- name: "Deployer - Backend - Run Container"
containers.podman.podman_container:
name: backend
image: mpp/backend:latest
state: started
recreate: on
network: host
volumes:
- "/root/backend/uploads:/usr/src/app/uploads"
- "/root/backend/.env:/usr/src/app/.env:ro"
restart_policy: always
command: "npm start"
when:
- deployerTask522 is defined
- deployerTask522.changed
tags:
- backend
- name: "Deployer - Frontend - Git Operations" - name: "Deployer - Frontend - Git Operations"
git: git:
repo: https://github.com/MetroHege/MPP-Frontend.git repo: https://github.com/MetroHege/MPP-Frontend.git
@ -232,3 +189,46 @@
- deployerTask532.changed - deployerTask532.changed
tags: tags:
- frontend - frontend
- name: "Deployer - Backend - Git Operations"
git:
repo: https://github.com/MetroHege/MPP-Backend.git
dest: /root/backend
version: main
register: deployerTask521
- name: "Deployer - Backend - Build Image"
containers.podman.podman_image:
name: mpp/backend
tag: latest
path: /root/backend
build:
file: Dockerfile
format: docker
cache: on
force: on
become: on
become_user: root
register: deployerTask522
when:
- (deployerTask521 is defined and deployerTask521.changed) or deployerTask521 is undefined
tags:
- backend
- name: "Deployer - Backend - Run Container"
containers.podman.podman_container:
name: backend
image: mpp/backend:latest
state: started
recreate: on
network: host
volumes:
- "/root/backend/uploads:/usr/src/app/uploads"
- "/root/backend/.env:/usr/src/app/.env:ro"
restart_policy: always
command: "npm start"
when:
- deployerTask522 is defined
- deployerTask522.changed
tags:
- backend