Update deployer.yml

This commit is contained in:
Matte 2024-04-18 21:56:38 +03:00
parent a3c00c39c9
commit 497306776a

View File

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