From c87287706279e1236b1eae62a23e479251fbc74a Mon Sep 17 00:00:00 2001 From: jiisanda Date: Fri, 29 Dec 2023 18:50:31 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20nginx=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- docker-compose.prod.yml | 10 ++++++++-- nginx/nginx.conf | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 nginx/nginx.conf diff --git a/README.md b/README.md index 91c73f3..3864175 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Download docker image from [docker-hub](https://hub.docker.com/r/jiisanda/docflo Or just run ```commandline -docker pull jiisanda/docflow +docker pull jiisanda/docflow:1 ``` ## 🧩 Implementation Detail diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 3369ec5..518d812 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,5 +1,11 @@ version: '3' services: api: - image: jiisanda/docflow - command: uvicorn app.main:app --host 0.0.0.0 --port 8000 \ No newline at end of file + image: jiisanda/docflow:1 + command: uvicorn app.main:app --host 0.0.0.0 --port 8000 + nginx: + image: nginx:1.25.3-alpine + ports: + - "80:80" + volumes: + - ./nginx:/etc/nginx/conf.dAnd \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..771a418 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,8 @@ +server { + listen 80; + server_name _; # As we are using IP address or the public DNS of our EC2 instance + + location / { + proxy_pass http://api:8000; + } +} \ No newline at end of file