Made the website into a docker container

This commit is contained in:
Stella⋆˚✿˖° 2024-11-12 12:15:32 +01:00
parent 6f8fbaf32a
commit 3eaef2ab70
8 changed files with 35 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM ubuntu:latest
RUN apt update && apt install nginx python3 -y
RUN rm -rf /etc/nginx/sites-enabled/default
ADD nginx/ /etc/nginx/
ADD www/ /var/html/www/
ENTRYPOINT ["nginx"]

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
services:
web:
build: .
# image: pixelated:testing
container_name: pixelated-web
ports:
- '80:80'

View File

@ -0,0 +1 @@
daemon off;

View File

@ -0,0 +1,17 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name pixelated.example.com;
root /var/html/www;
index index.html;
location / {
if ($request_uri ~ ^/(.*)\.html) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;
}
}