-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from icyflame/icyflame/put-peqp-in-static
Put peqp in a separate volume called "static"
- Loading branch information
Showing
5 changed files
with
54 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM nginx:mainline | ||
COPY metakgp.org /etc/nginx/sites-enabled/ | ||
COPY wiki.metakgp.org /etc/nginx/sites-enabled/ | ||
COPY static.metakgp.org /etc/nginx/sites-enabled/ | ||
COPY nginx.conf /etc/nginx/ | ||
RUN rm /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
server { | ||
# listen 8080 default_server; | ||
listen 80; | ||
# listen [::]:80 default_server ipv6only=on; | ||
|
||
root /srv/static; | ||
autoindex off; | ||
|
||
# Make site accessible from everywhere | ||
server_name static.metakgp.org; | ||
|
||
# Location for the wiki's root | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
|
||
# Cloudflare masks real IPs | ||
set_real_ip_from 199.27.128.0/21; | ||
set_real_ip_from 173.245.48.0/20; | ||
set_real_ip_from 103.21.244.0/22; | ||
set_real_ip_from 103.22.200.0/22; | ||
set_real_ip_from 103.31.4.0/22; | ||
set_real_ip_from 141.101.64.0/18; | ||
set_real_ip_from 108.162.192.0/18; | ||
set_real_ip_from 190.93.240.0/20; | ||
set_real_ip_from 188.114.96.0/20; | ||
set_real_ip_from 197.234.240.0/22; | ||
set_real_ip_from 198.41.128.0/17; | ||
set_real_ip_from 162.158.0.0/15; | ||
set_real_ip_from 104.16.0.0/12; | ||
set_real_ip_from 172.64.0.0/13; | ||
set_real_ip_from 2400:cb00::/32; | ||
set_real_ip_from 2606:4700::/32; | ||
set_real_ip_from 2803:f800::/32; | ||
set_real_ip_from 2405:b500::/32; | ||
set_real_ip_from 2405:8100::/32; | ||
set_real_ip_from 127.0.0.1/32; | ||
real_ip_header CF-Connecting-IP; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xe | ||
|
||
source .env | ||
NGINX_CONTAINER=$(docker ps --format '{{ .Names }}' | grep nginx) | ||
docker cp $1/. $NGINX_CONTAINER:/srv/static |