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 @@