Add configuration for nginx

This commit is contained in:
Saurab-Shrestha 2024-05-05 07:17:16 +05:45
parent ba71a39971
commit 7cfbad8b59
3 changed files with 22 additions and 0 deletions

11
Dockerfile.nginx Normal file
View File

@ -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;"]

View File

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

0
nginx/nginx.conf Normal file
View File