-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.yaml
More file actions
78 lines (59 loc) · 1.68 KB
/
Copy pathserver.yaml
File metadata and controls
78 lines (59 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
- hosts: server
become: yes
tasks:
- name: Install dnf-utils
dnf:
name: dnf-utils
state: present
- name: Add Docker CE repository using command
ansible.builtin.command:
cmd: dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
- name: Install Docker and plugins
dnf:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
state: present
- name: Start and enable Docker service
systemd:
name: docker
state: started
enabled: yes
- name: Install Nginx service
dnf:
name: nginx
state: present
- name: Copy Nginx configuration file
copy:
src: nginx.conf
dest: /etc/nginx/nginx.conf
owner: root
group: root
- name: Start and enable Nginx service
systemd:
name: nginx
state: started
enabled: yes
- name: Install Git
dnf:
name: git
state: present
- name: Clone the repository
git:
repo: https://github.com/Project-Testify/Testify.git
dest: /opt/Testify
update: yes
# Run docker compose with environment
- name: Copy .env file to the project directory
copy:
src: .env
dest: /opt/Testify/.env
- name: Run docker-compose
ansible.builtin.command:
cmd: docker compose up -d
args:
chdir: /opt/Testify