first push

This commit is contained in:
Kfir Dayan 2023-09-10 16:56:04 +03:00
parent 95de21d691
commit ac32598d00
3 changed files with 23 additions and 5 deletions

View file

@ -11,17 +11,22 @@ RUN mkdir -p /etc/nginx/custom
COPY index.html /usr/share/nginx/html/
COPY logo.png /usr/share/nginx/html/
# Copy Nginx configuration file
# Copy Nginx configuration file for HTTP
COPY nginx.conf /etc/nginx/custom/nginx.conf
# Copy SSL/TLS certificate and key
COPY certificates/commit-kfir.crt /etc/nginx/ssl/
COPY certificates/commit-kfir.key /etc/nginx/ssl/
# Copy a custom script that will start Nginx and keep it running
COPY start-nginx.sh /usr/local/bin/start-nginx.sh
# Make the script executable
RUN chmod +x /usr/local/bin/start-nginx.sh
# Expose port 80 for incoming HTTP traffic
# Expose ports 80 for HTTP and 443 for HTTPS
EXPOSE 80
EXPOSE 443
# Define the command to start Nginx using your custom script
CMD ["/usr/local/bin/start-nginx.sh"]

View file

@ -4,7 +4,7 @@
<title>Hello Commit</title>
</head>
<body>
<h1>Hello Commit</h1>
<h1>Hello Commit New</h1>
<img src="logo.png" alt="Logo">
</body>
</html>

View file

@ -7,5 +7,18 @@ server {
index index.html;
}
# Other server block configurations...
}
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/ssl/commit-kfir.crt;
ssl_certificate_key /etc/nginx/ssl/commit-kfir.key;
location / {
root /usr/share/nginx/html;
index index.html;
}
}