Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
fefdb816
Commit
fefdb816
authored
Oct 10, 2017
by
muhammad-ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
staticfiles changes
parent
af850807
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
96 deletions
+7
-96
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/pipeline.j2
+0
-96
playbooks/roles/video_pipeline/defaults/main.yml
+4
-0
playbooks/roles/video_pipeline/templates/instance_config.yaml.j2
+3
-0
No files found.
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/pipeline.j2
deleted
100644 → 0
View file @
af850807
#
# {{ ansible_managed }}
#
# Author: Muhammad Ammar
{% if "video_pipeline" in nginx_default_sites %}
{% set default_site = "default_server" %}
{% else %}
{% set default_site = "" %}
{% endif %}
upstream video_pipeline_app_server {
{% for host in NGINX_VIDEO_PIPELINE_GUNICORN_HOSTS %}
server {{ host }}:{{ video_pipeline_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
server_name {{ VIDEO_PIPELINE_HOSTNAME }};
{% if NGINX_ENABLE_SSL %}
listen {{ VIDEO_PIPELINE_NGINX_PORT }} {{ default_site }};
listen {{ VIDEO_PIPELINE_SSL_NGINX_PORT }} ssl;
{% include "common-settings.j2" %}
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
# request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %}
listen {{ VIDEO_PIPELINE_NGINX_PORT }} {{ default_site }};
{% endif %}
# Prevent invalid display courseware in IE 10+ with high privacy settings
add_header P3P '{{ NGINX_P3P_MESSAGE }}';
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ video_pipeline_service_name }};
try_files /staticfiles/$file =404;
}
location / {
try_files $uri @proxy_to_app;
}
{% include "robots.j2" %}
location @proxy_to_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
{% else %}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
{% endif %}
# newrelic-specific header records the time when nginx handles a request.
proxy_set_header X-Queue-Start "t=${msec}";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://video_pipeline_app_server;
}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
{% elif NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
return 301 https://$host$request_uri;
}
{% endif %}
}
playbooks/roles/video_pipeline/defaults/main.yml
View file @
fefdb816
...
@@ -88,6 +88,10 @@ VIDEO_PIPELINE_EXTRA_APPS: []
...
@@ -88,6 +88,10 @@ VIDEO_PIPELINE_EXTRA_APPS: []
# See edx_django_service_automated_users for an example of what this should be
# See edx_django_service_automated_users for an example of what this should be
VIDEO_PIPELINE_AUTOMATED_USERS
:
{}
VIDEO_PIPELINE_AUTOMATED_USERS
:
{}
# static files settings
VIDEO_PIPELINE_DATA_DIR
:
'
{{
COMMON_DATA_DIR
}}/{{
video_pipeline_service_name
}}'
VIDEO_PIPELINE_STATIC_ROOT
:
'
{{
VIDEO_PIPELINE_DATA_DIR
}}/staticfiles'
# instance_config.yaml variable overrides
# instance_config.yaml variable overrides
VIDEO_PIPELINE_EDX_CLOUDFRONT_PREFIX
:
"
SET-ME-PLEASE"
VIDEO_PIPELINE_EDX_CLOUDFRONT_PREFIX
:
"
SET-ME-PLEASE"
...
...
playbooks/roles/video_pipeline/templates/instance_config.yaml.j2
View file @
fefdb816
...
@@ -18,6 +18,9 @@ django_secret_key: '{{ VIDEO_PIPELINE_SECRET_KEY }}'
...
@@ -18,6 +18,9 @@ django_secret_key: '{{ VIDEO_PIPELINE_SECRET_KEY }}'
# (set to false in prod)
# (set to false in prod)
debug: false
debug: false
# django staticfile settings
STATIC_ROOT_PATH: '{{ VIDEO_PIPELINE_STATIC_ROOT }}'
# ---
# ---
# AWS Buckets, Prefixes
# AWS Buckets, Prefixes
# ---
# ---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment