diff --git a/dockerfiles/obsidian-export/Dockerfile b/dockerfiles/obsidian-export/Dockerfile new file mode 100644 index 0000000..69dfb80 --- /dev/null +++ b/dockerfiles/obsidian-export/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:alpine AS final + +RUN rm -rf /usr/share/nginx/html/index.html +COPY ./docs /usr/share/nginx/html +COPY ./conf.d /etc/nginx/conf.d + +EXPOSE 80 +EXPOSE 443 diff --git a/dockerfiles/obsidian-export/conf.d/default.conf b/dockerfiles/obsidian-export/conf.d/default.conf new file mode 100644 index 0000000..db18819 --- /dev/null +++ b/dockerfiles/obsidian-export/conf.d/default.conf @@ -0,0 +1,48 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + charset UTF-8; + + #access_log /var/log/nginx/host.access.log main; + + location / { + autoindex on; + autoindex_exact_size off; + autoindex_format html; + autoindex_localtime on; + index index.html index.htm; + root /usr/share/nginx/html/; + } + + #error_page 404 /404.html; + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + diff --git a/dockerfiles/obsidian-export/docker-compose.yml b/dockerfiles/obsidian-export/docker-compose.yml new file mode 100644 index 0000000..cacdb48 --- /dev/null +++ b/dockerfiles/obsidian-export/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.9" +services: + nginx: + image: nginx:alpine + ports: + - "81:80" + # - "443:443" + volumes: + - ./conf.d/:/etc/nginx/conf.d:ro + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - ./docs:/usr/share/nginx/html