Skip to content

Commit

Permalink
🎉 Initial Commit
Browse files Browse the repository at this point in the history
Signed-off-by: Teakowa <27560638+Teakowa@users.noreply.github.com>
  • Loading branch information
Teakowa committed Apr 7, 2024
0 parents commit 99275a6
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
upstream cdn {
server cdn.gallerix.asia:443;
}

upstream v {
server v.gallerix.org:443;
}


server {
listen 80 default_server;
server_name cdn.14159.mov;

if ($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}

location = / {
return 418;
}

location ^~ /status {
access_log off;
log_not_found off;
default_type application/json;
if ($http_user_agent ~* (UptimeRobot)){
return 200 '{"status": "success", "messages": "status check."}';
}
return 444;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

location ^~ /x/ {
proxy_pass_header Server;
include /etc/nginx/proxy-header.conf;
proxy_pass https://cdn;
expires max;
}

location ^~ /B/ {
proxy_pass_header Server;
include /etc/nginx/proxy-header.conf;
proxy_pass https://v;
expires max;
}

location ~ /\.(?!well-known).* {
log_not_found off;
deny all;
}
}
7 changes: 7 additions & 0 deletions .docker/proxy-header.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
proxy_set_header Accept-Encoding '';
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.github
Dockerfile*
*.md
LICENSE
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit : 10
# Enable version updates for npm
- package-ecosystem: 'docker'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
11 changes: 11 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Merge PRs
on:
pull_request:

jobs:
automerge:
name: Auto Merge
if: ${{ github.actor == 'dependabot[bot]' }}
uses: bytefloat/workflows/.github/workflows/dependabot-auto-merge.yml@main
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Images

on:
schedule:
- cron: "0 8 * * *" # everyday at 8am UTC
release:
types: [published]
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:

jobs:
registry:
name: Build & Push
uses: bytefloat/workflows/.github/workflows/docker-build.yml@main
with:
custom-tag: 'fspnetwork/nginx:latest'
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:latest
COPY .docker/proxy-header.conf /etc/nginx/proxy-header.conf
COPY .docker/nginx.conf /etc/nginx/conf.d/default.conf

0 comments on commit 99275a6

Please sign in to comment.