forked from ubccr/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #543 from ucb-rit/develop
v3.4.1 Changes
- Loading branch information
Showing
15 changed files
with
332 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ dist | |
build | ||
*._* | ||
*.DS_Store | ||
.env | ||
*.swp | ||
env/ | ||
venv/ | ||
|
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,5 @@ | ||
FROM python:3 | ||
|
||
LABEL description="coldfront email" | ||
|
||
RUN apt update && apt install -y sudo net-tools |
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 |
---|---|---|
|
@@ -174,6 +174,7 @@ sentry_dsn: "" | |
# debug_toolbar_ips: [] | ||
|
||
# # Email settings. | ||
# email_host: localhost | ||
# email_port: 25 | ||
# # TODO: Set these addresses to yours. | ||
# from_email: [email protected] | ||
|
@@ -229,6 +230,7 @@ sentry_dsn: "" | |
# debug_toolbar_ips: [] | ||
|
||
# # Email settings. | ||
# email_host: localhost | ||
# email_port: 25 | ||
# # TODO: Set these addresses to yours. | ||
# from_email: [email protected] | ||
|
@@ -281,6 +283,7 @@ sentry_dsn: "" | |
# debug_toolbar_ips: ['10.0.2.2'] # 10.0.2.2 is the vagrant host. | ||
|
||
# # Email settings. | ||
# email_host: localhost | ||
# email_port: 1025 | ||
# # TODO: Set these addresses to yours. | ||
# from_email: [email protected] | ||
|
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,4 @@ | ||
#!/bin/bash | ||
# $1 = database name | ||
# $2 = dump file | ||
docker exec -i coldfront-db-1 pg_restore --verbose --clean -U admin -d $1 < $2 | ||
docker exec -i coldfront-db-1 pg_restore --verbose --clean -U admin -d $1<$2 |
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,14 @@ | ||
from jinja2 import Environment | ||
from jinja2 import FileSystemLoader | ||
import yaml | ||
|
||
|
||
env = Environment(loader=FileSystemLoader('bootstrap/ansible/')) | ||
env.filters['bool'] = lambda x: str(x).lower() in ['true', 'yes', 'on', '1'] | ||
options = yaml.safe_load(open('main.yml').read()) | ||
options.update({ | ||
'db_host': 'db', | ||
'email_host': 'email', | ||
'redis_host': 'redis', | ||
}) | ||
print(env.get_template('settings_template.tmpl').render(options)) |
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,14 +1,4 @@ | ||
#!/usr/bin/env bash | ||
cp coldfront/config/local_settings.py.sample \ | ||
coldfront/config/local_settings.py | ||
cp coldfront/config/local_strings.py.sample \ | ||
coldfront/config/local_strings.py | ||
python -c \ | ||
"from jinja2 import Template, Environment, FileSystemLoader; \ | ||
import yaml; \ | ||
env = Environment(loader=FileSystemLoader('bootstrap/ansible/')); \ | ||
env.filters['bool'] = lambda x: str(x).lower() in ['true', 'yes', 'on', '1']; \ | ||
options = yaml.safe_load(open('main.yml').read()); \ | ||
options.update({'redis_host': 'redis', 'db_host': 'db'}); \ | ||
print(env.get_template('settings_template.tmpl').render(options))" \ | ||
> coldfront/config/dev_settings.py | ||
cp coldfront/config/local_settings.py.sample coldfront/config/local_settings.py | ||
cp coldfront/config/local_strings.py.sample coldfront/config/local_strings.py | ||
python bootstrap/development/gen_config.py > coldfront/config/dev_settings.py |
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
Oops, something went wrong.