From 7cfbad8b597ea8da8581c99f2fce85437d6cd361 Mon Sep 17 00:00:00 2001 From: Saurab-Shrestha Date: Sun, 5 May 2024 07:17:16 +0545 Subject: [PATCH] Add configuration for nginx --- Dockerfile.nginx | 11 +++++++++++ docker-compose.yaml | 11 +++++++++++ nginx/nginx.conf | 0 3 files changed, 22 insertions(+) create mode 100644 Dockerfile.nginx create mode 100644 nginx/nginx.conf diff --git a/Dockerfile.nginx b/Dockerfile.nginx new file mode 100644 index 00000000..73125b6d --- /dev/null +++ b/Dockerfile.nginx @@ -0,0 +1,11 @@ +# Use the official Nginx image as the base +FROM nginx:latest + +# Copy the custom Nginx configuration file +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Expose port 80 for incoming HTTP requests +EXPOSE 80 + +# Start Nginx in the foreground +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 63a7e2bd..bad52060 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -43,6 +43,17 @@ services: - postgres-data:/var/lib/postgresql/data ports: - 5433:${DB_PORT} + + nginx: + build: + context: . + dockerfile: Dockerfile.nginx + ports: + - 80:80 + volumes: + - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf + depends_on: + - private-gpt volumes: postgres-data: diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 00000000..e69de29b