diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e31b5d8d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:latest +COPY . /usr/share/nginx/html +EXPOSE 80 diff --git a/deploy.yml b/deploy.yml new file mode 100644 index 00000000..7d98e876 --- /dev/null +++ b/deploy.yml @@ -0,0 +1,12 @@ +--- +- hosts: servers + tasks: + + - name: Stop old container + shell: docker rm -f myapp || true + + - name: Pull latest image + shell: docker pull venkatsaireddy/app:latest + + - name: Run container + shell: docker run -d -p 80:80 --name myapp venkatsaireddy/app:latest diff --git a/index.html b/index.html index a9d35eca..4fc85d4f 100644 --- a/index.html +++ b/index.html @@ -192,7 +192,7 @@

Contact

- + diff --git a/inventory b/inventory new file mode 100644 index 00000000..9624ed17 --- /dev/null +++ b/inventory @@ -0,0 +1,2 @@ +[servers] +localhost ansible_connection=local diff --git a/venkat.txt b/venkat.txt new file mode 100644 index 00000000..b7ad2bb7 --- /dev/null +++ b/venkat.txt @@ -0,0 +1 @@ +hello izm venkat