diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..38d09b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM nginx:alpine + +# Copy the HTML file +COPY index.html /usr/share/nginx/html/index.html + +# Copy nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Expose port 80 +EXPOSE 80 + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..747f7dd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +name: threejs-test + +services: + ui: + build: . + restart: unless-stopped + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2c3229d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + server_name localhost; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ =404; + } + + # Enable gzip compression + gzip on; + gzip_types text/html text/css application/javascript; + gzip_min_length 1000; +} +