Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/0-bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "⚠️ Report an Issue"
description: "Please let us know if something is not right..."
labels: ["bug"]
assignees:
- smashedr

body:
- type: markdown
attributes:
value: |
All issues will be responded too.

- type: textarea
id: description
validations:
required: true
attributes:
label: Details
description: Please describe the issue you are experiencing and how to reproduce.
placeholder: Provide as many details as you can...

- type: textarea
id: logs
validations:
required: false
attributes:
label: Log Output
description: Paste any relevant logs or output in this box.
placeholder: Output is automatically wrapped in a code block.
render: shell

- type: markdown
attributes:
value: |
Thank you for taking the time to make this report!
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/1-feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "💡 Request a Feature"
description: "Request new features or enhancements"
labels: ["enhancement"]
assignees:
- smashedr

body:
- type: markdown
attributes:
value: |
All requests will be responded too.

- type: textarea
id: description
validations:
required: true
attributes:
label: Details
description: Please describe the feature or enhancement you are requesting and what it should do.
placeholder: Provide as many details as you can...

- type: markdown
attributes:
value: |
Thank you for taking the time to make this report!
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blank_issues_enabled: true
contact_links:
- name: "❔ Start a Discussion"
about: Ask a general question or start a discussion
url: https://github.com/cssnr/docker-nginx-static/discussions/new?category=q-a

- name: "💬 Join Discord"
about: Chat with us about anything
url: https://discord.gg/wXy6m2X8wY
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ jobs:
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
10 changes: 9 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@ jobs:
if: ${{ !cancelled() }}
uses: cssnr/actionlint-action@v1

- name: "Hadolint"
- name: "hadolint"
if: ${{ !cancelled() }}
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: src/Dockerfile
ignore: DL3018

- name: "shellcheck"
if: ${{ !cancelled() }}
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x
with:
scandir: src
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
"options": {
"printWidth": 119,
"singleQuote": false
}
},
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@

# Docker Nginx Static

Docker Static Web Server
Docker Nginx Static Web Server.

Coming Soon...
```shell
cd directory-to-serve
docker run --rm -p 80:80 -v "$(pwd):/static" ghcr.io/cssnr/docker-nginx-static:latest
```

## Options

| Variable | Default | Description of Environment Variable |
| :---------- | :--------------------: | :------------------------------------------------- |
| STATIC | /static | Nginx root directory |
| SUID | 1000 | Directory group/user ID |
| STATIC | `/static` | Nginx root directory |
| SUID | `1000` | Directory group/user ID |
| NGINX_INDEX | `index.html index.htm` | Nginx directory index files |
| ERROR_PAGE | `/404.html` | Nginx 404 page, set `off` to disable |
| GZIP_TYPES | `*` | Nginx gzip_types, set `off` to disable |
Expand Down Expand Up @@ -58,29 +61,30 @@ For examples see:
- [docker-compose.yaml](docker-compose.yaml)
- [docker-compose-swarm.yaml](docker-compose-swarm.yaml)

## Support
# Support

Please let us know if you run into any [issues](https://github.com/cssnr/docker-nginx-static/issues)
or want to see [new features](https://github.com/cssnr/docker-nginx-static/discussions/categories/feature-requests)...

For general help or to request a feature:
For general help or to request a feature, see:

- Q&A Discussion: https://github.com/cssnr/docker-nginx-static/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/docker-nginx-static/discussions/categories/feature-requests
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY

If you are experiencing an issue/bug or getting unexpected results:
If you are experiencing an issue/bug or getting unexpected results, you can:

- Report an Issue: https://github.com/cssnr/docker-nginx-static/issues
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=actions-tools)
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/)

# Contributing

If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).

Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.

[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)

If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).

For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)
3 changes: 3 additions & 0 deletions src/10-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ fi
if [ "${ERROR_PAGE}" != "off" ];then
echo "ERROR_PAGE: ${ERROR_PAGE}"
echo "error_page 404 ${ERROR_PAGE};" >> /etc/nginx/conf.d/location.auth.conf
sed "s,ERROR_PAGE,${ERROR_PAGE},g" -i /etc/nginx/nginx.conf
else
sed "s/ERROR_PAGE//g" -i /etc/nginx/nginx.conf
fi

if [ -n "${BASIC_AUTH}" ];then
Expand Down
2 changes: 1 addition & 1 deletion src/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ http {
root /static;
index NGINX_INDEX;
autoindex on;
try_files $uri $uri.html $uri/ /404.html =404;
try_files $uri $uri.html $uri/ ERROR_PAGE =404;
include /etc/nginx/conf.d/location.*;
}
}
Expand Down