Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
2aafd966
Commit
2aafd966
authored
Apr 09, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move more of our AWS config to tokens from JSON files
parent
ed1bd97f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
34 deletions
+9
-34
envs/aws.py
+9
-34
No files found.
envs/aws.py
View file @
2aafd966
...
...
@@ -26,46 +26,21 @@ with open(BASE_DIR / "env.json") as env_file:
SITE_NAME
=
ENV_TOKENS
[
'SITE_NAME'
]
# "extstage.mitx.mit.edu"
CSRF_COOKIE_DOMAIN
=
ENV_TOKENS
[
'CSRF_COOKIE_DOMAIN'
]
# '.mitx.mit.edu'
BOOK_URL
=
ENV_TOKENS
[
'BOOK_URL'
]
# 'https://mitxstatic.s3.amazonaws.com/book_images/'
LIB_URL
=
ENV_TOKENS
[
'LIB_URL'
]
# 'https://mitxstatic.s3.amazonaws.com/js/'
MEDIA_URL
=
ENV_TOKENS
[
'MEDIA_URL'
]
# 'http://s3.amazonaws.com/mitx_askbot_stage/'
BOOK_URL
=
ENV_TOKENS
[
'BOOK_URL'
]
LIB_URL
=
ENV_TOKENS
[
'LIB_URL'
]
MEDIA_URL
=
ENV_TOKENS
[
'MEDIA_URL'
]
LOG_DIR
=
ENV_TOKENS
[
'LOG_DIR'
]
LOG_DIR
=
ENV_TOKENS
[
'LOG_DIR'
]
# "/mnt/logs/"
CACHES
=
{
'default'
:
{
'BACKEND'
:
'django.core.cache.backends.memcached.MemcachedCache'
,
}
}
CACHES
=
{
'default'
:
{
'BACKEND'
:
'django.core.cache.backends.memcached.MemcachedCache'
,
'LOCATION'
:
'127.0.0.1:11211'
,
},
'general'
:
{
'BACKEND'
:
'django.core.cache.backends.memcached.MemcachedCache'
,
'LOCATION'
:
'127.0.0.1:11211'
,
'KEY_PREFIX'
:
'general'
,
'VERSION'
:
5
,
}
}
CACHES
=
ENV_TOKENS
[
'CACHES'
]
############################## SECURE AUTH ITEMS ###############################
# Secret things: passwords, access keys, etc.
with
open
(
BASE_DIR
/
"auth.json"
)
as
auth_file
:
AUTH_TOKENS
=
json
.
load
(
auth_file
)
SECRET_KEY
=
AUTH_TOKENS
[
'SECRET_KEY'
]
AWS_ACCESS_KEY_ID
=
AUTH_TOKENS
[
"AWS_ACCESS_KEY_ID"
]
AWS_SECRET_ACCESS_KEY
=
AUTH_TOKENS
[
"AWS_SECRET_ACCESS_KEY"
]
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.mysql'
,
'NAME'
:
'wwc'
,
'USER'
:
'root'
,
'PASSWORD'
:
authtokens
[
"PASSWORD"
],
'HOST'
:
'staging.ciqreuddjk02.us-east-1.rds.amazonaws.com'
,
'PORT'
:
'3306'
,
}
}
\ No newline at end of file
DATABASES
=
AUTH_TOKENS
[
'DATABASES'
]
\ No newline at end of file
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