-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path71_install_front_docker.yaml
48 lines (38 loc) · 1.13 KB
/
71_install_front_docker.yaml
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
---
- name: deploy front ec2 instance
hosts: ec2-front
vars_files:
- vars/ec2-front.yaml
tasks:
- name: Install packages (yum)
yum:
name: docker
state: present
become: yes
- name: Install NGINX
shell: sudo amazon-linux-extras install -y nginx1
become: yes
- name: copy nginx
copy:
src: /home/ec2-user/mso-cloud-ansible/Frontend/Nginx/nginx.conf
dest: /etc/nginx/nginx.conf
remote_src: yes
become: yes
- name: run NGINX
systemd:
name: nginx
state: started
enabled: yes
become: yes
- name: run frontend
shell: 'docker run -d -p 5061:5061 --env BACKEND_PORT=5050 --env BACKEND_HOST=10.56.234.10 eu.gcr.io/fwardz001-poc-ci1s/frontend_server:latest'
become: yes
# - name: run frontend
# community.general.docker_container:
# name: frontend
# image: eu.gcr.io/fwardz001-poc-ci1s/frontend_server:latest
# ports: 5061:5061
# env:
# BACKEND_HOST: '10.56.234.10'
# BACKEND_PORT: '5050'
# state: present