-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put peqp in a separate volume called "static" #27
Merged
icyflame
merged 9 commits into
metakgp:master
from
icyflame:icyflame/put-peqp-in-static
Nov 14, 2017
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
aa5ed6c
create a new static volume for peqp
icyflame 73256ed
remove default_server from nginx/static
icyflame a6d8da9
add a script to restore peqp from backup
icyflame 39fa161
serve everything from static folder for this server_name
icyflame 788e4c3
serve wiki only for one server_name
icyflame d4f7e5e
rename conf files appropriately
icyflame 4712a97
move definition of static-volume to prod override
icyflame aae29aa
remove boilerplate from nginx conf files
icyflame 392baec
Turn autoindex off
icyflame File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a slight preference against having scripts to do very simple things, like run
docker cp
. Perhaps this belongs to the runbook instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, We could put this in the runbook, this script just felt natural beside the mysql backup restore script. I think we should keep it.