mirror of
https://github.com/MatteZ02/infra.git
synced 2024-11-10 04:50:20 +00:00
Update deployer.yml
This commit is contained in:
parent
bd3ca45f1a
commit
32cfff9039
@ -147,49 +147,6 @@
|
||||
tags:
|
||||
- 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"
|
||||
git:
|
||||
repo: https://github.com/MetroHege/MPP-Frontend.git
|
||||
@ -232,3 +189,46 @@
|
||||
- deployerTask532.changed
|
||||
tags:
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user