diff --git a/Makefile b/Makefile index 5b1bed5..9eb3949 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ IMAGE_NAME ?= capcom6/android-sms-gateway-docs CONTAINER_NAME ?= android-sms-gateway-docs # Set the port to expose on the host -HOST_PORT ?= 8000 +HOST_PORT ?= 8080 # Makefile targets .PHONY: build run stop clean @@ -19,8 +19,8 @@ build: docker build -t $(IMAGE_NAME) . # Run the Docker container -run: - docker run --name $(CONTAINER_NAME) -d -p $(HOST_PORT):80 $(IMAGE_NAME) +run: build + docker run --rm --name $(CONTAINER_NAME) -p $(HOST_PORT):80 $(IMAGE_NAME) # Stop and remove the Docker container stop: @@ -28,7 +28,7 @@ stop: docker rm $(CONTAINER_NAME) # Remove the Docker image -clean: +clean: stop docker rmi $(IMAGE_NAME) # Rebuild the Docker image diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000..e9f64b5 --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: https://sms-gate.app/sitemap.xml diff --git a/nginx.conf b/nginx.conf index 0874c9b..b1363c3 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,10 +4,11 @@ server { set_real_ip_from 10.0.0.0/8; real_ip_header X-Forwarded-For; + root /usr/share/nginx/html; + location / { - root /usr/share/nginx/html; - index index.html; - try_files $uri $uri/ =404; + index index.html index.htm; + try_files $uri $uri/ /index.html; } # Disable logging for favicon @@ -17,11 +18,11 @@ server { } # Optimize serving static files - # location ~* \.(?:css|js|svg|gif|png|jpg|jpeg|webp)$ { - # expires 1y; - # access_log off; - # add_header Cache-Control "public"; - # } + location ~* \.(?:css|js|svg|gif|png|jpg|jpeg|webp)$ { + expires 1y; + access_log off; + add_header Cache-Control "public"; + } # Gzip Compression gzip on;