-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task/FP-1120 & task/FP-1136: Allow standalone services (e.g. CMS/Docs…
…/Portal) (#19) * ignore .idea IDE project directoy * Breaking up services into independent composable files to facilitate fully customizable suite of services. Including a default configuration for commonly deployed services * updating Makefile with full path to overrides compose overrides * Including env file in override * use relative paths * Use home environment variable to help find configs * use home var to find configs * moving base compose files * gitignoring custom overrides--not tracked here * Updating readme and changing the default docs command to build * Update Makefile with default CAMINO_HOME Co-authored-by: Sal Tijerina <[email protected]> * task/fp 1120 1135: Update samples, gitignore, and fix CAMINO_HOME (#20) * update samples; organize .gitgnore * formatting * move CAMINO_HOME declaration to top * fix CAMINO_HOME var * ignore all but example in conf/portal * add sample "CAMINO_HOME" setting Co-authored-by: Sal Tijerina <[email protected]>
- Loading branch information
1 parent
2398e75
commit 26a10b4
Showing
19 changed files
with
386 additions
and
331 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
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ COMPOSE_FILE= | |
CMS_TAG= | ||
PORTAL_TAG= | ||
SSH_HOST= | ||
CUSTOM_SETTINGS_PORTAL= | ||
CAMINO_HOME=/opt/portal/Camino |
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,28 +1,43 @@ | ||
_SECRET_KEY = 'change_me' | ||
_DEBUG = True | ||
_ALLOWED_HOSTS = ['*'] | ||
_SITE_ID = 1 | ||
_CMS_TEMPLATES = ( | ||
## Customize this | ||
('base.html', 'Base'), | ||
('cms_menu.html', 'CMS Menu'), | ||
('fullwidth.html', 'Fullwidth'), | ||
('sidebar_left.html', 'Sidebar Left'), | ||
('sidebar_right.html', 'Sidebar Right') | ||
) | ||
# SECRET SETTINGS VALUES. | ||
# SAMPLE.TACC.UTEXAS.EDU | ||
|
||
# As needed: | ||
#_CACHES = { | ||
# 'default': { | ||
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', | ||
# 'LOCATION': 'frontera_portal_memcached:11211', | ||
# } | ||
#} | ||
######################## | ||
# DJANGO SETTINGS | ||
######################## | ||
|
||
SECRET_KEY = 'change_me' | ||
ALLOWED_HOSTS = ['sample.tacc.utexas.edu'] | ||
CEP_AUTH_VERIFICATION_ENDPOINT = 'https://sample.tacc.utexas.edu' | ||
|
||
_DATABASE_ENGINE = 'django.db.backends.postgresql' | ||
_DATABASE_NAME = 'postgres' | ||
_DATABASE_USERNAME = 'postgres' | ||
_DATABASE_PASSWORD = 'secretpw' | ||
_DATABASE_HOST = 'postgres_host' | ||
_DATABASE_PORT = 5432 | ||
######################## | ||
# DATABASE SETTINGS | ||
######################## | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'PORT': '5432', | ||
'NAME': 'sample_cms', | ||
'USER': 'sample_cms', | ||
'PASSWORD': 'change_me', | ||
'HOST': 'portal_postgres' | ||
} | ||
} | ||
|
||
######################## | ||
# ELASTICSEARCH | ||
######################## | ||
|
||
ES_HOSTS = 'https://esclient:9200' | ||
ES_AUTH = 'sample:change_me' | ||
ES_INDEX_PREFIX = 'sample-{}' | ||
ES_DOMAIN = 'https://sample.tacc.utexas.edu' | ||
|
||
HAYSTACK_CONNECTIONS = { | ||
'default': { | ||
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', | ||
'URL': ES_HOSTS, | ||
'INDEX_NAME': ES_INDEX_PREFIX.format('cms'), | ||
'KWARGS': {'http_auth': ES_AUTH } | ||
} | ||
} |
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,16 @@ | ||
version: "3.8" | ||
services: | ||
cms: | ||
image: ${CMS_IMAGE}:${CMS_TAG} | ||
volumes: | ||
- ${CAMINO_HOME}/conf/cms/secrets.py:/code/taccsite_cms/secrets.py | ||
- ${CAMINO_HOME}/conf/uwsgi/uwsgi_cms.ini:/code/uwsgi.ini | ||
- /var/www/portal/cms/static:/code/static | ||
- /var/www/portal/cms/media:/code/media | ||
command: ["uwsgi", "--ini", "uwsgi.ini"] | ||
container_name: portal_cms | ||
logging: | ||
driver: syslog | ||
options: | ||
tag: portal_cms | ||
restart: always |
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,63 @@ | ||
version: "3.8" | ||
services: | ||
nginx: | ||
extends: | ||
file: ${CAMINO_HOME}/conf/compose/docker-compose.nginx.yml | ||
service: nginx | ||
volumes: | ||
- ${CAMINO_HOME}/conf/nginx/nginx.conf:/etc/nginx/nginx.conf | ||
- ${CAMINO_HOME}/conf/uwsgi/uwsgi_params:/etc/nginx/uwsgi_params | ||
- /etc/ssl/dhparam.pem:/etc/ssl/dhparam.pem | ||
- /var/www/portal/cms/static:/var/www/portal/cms/static | ||
- /var/www/portal/cms/media:/var/www/portal/cms/media | ||
- /var/www/portal/portal/media:/var/www/portal/portal/media | ||
- /var/www/portal/portal/static:/var/www/portal/portal/static | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
container_name: portal_nginx | ||
logging: | ||
driver: syslog | ||
options: | ||
tag: portal_nginx | ||
restart: always | ||
|
||
memcached: | ||
extends: | ||
file: docker-compose.memcached.yml | ||
service: memcached | ||
|
||
redis: | ||
extends: | ||
file: docker-compose.redis.yml | ||
service: redis | ||
|
||
rabbitmq: | ||
extends: | ||
file: docker-compose.rabbitmq.yml | ||
service: rabbitmq | ||
|
||
websockets: | ||
extends: | ||
file: docker-compose.websockets.yml | ||
service: websockets | ||
|
||
core: | ||
extends: | ||
file: docker-compose.core.yml | ||
service: core | ||
|
||
workers: | ||
extends: | ||
file: docker-compose.workers.yml | ||
service: workers | ||
|
||
cms: | ||
extends: | ||
file: docker-compose.cms.yml | ||
service: cms | ||
|
||
volumes: | ||
portal_es_data: | ||
portal_redis_data: | ||
portal_rabbitmq_data: |
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,78 @@ | ||
version: "3.8" | ||
services: | ||
nginx: | ||
extends: | ||
file: ${CAMINO_HOME}/conf/compose/docker-compose.nginx.yml | ||
service: nginx | ||
volumes: | ||
- ${CAMINO_HOME}/conf/nginx/nginx.conf:/etc/nginx/nginx.conf | ||
- ${CAMINO_HOME}/conf/uwsgi/uwsgi_params:/etc/nginx/uwsgi_params | ||
- /etc/ssl/dhparam.pem:/etc/ssl/dhparam.pem | ||
- /var/www/portal/cms/static:/var/www/portal/cms/static | ||
- /var/www/portal/cms/media:/var/www/portal/cms/media | ||
- /var/www/portal/portal/media:/var/www/portal/portal/media | ||
- /var/www/portal/portal/static:/var/www/portal/portal/static | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
container_name: portal_nginx | ||
logging: | ||
driver: syslog | ||
options: | ||
tag: portal_nginx | ||
restart: always | ||
|
||
docs: | ||
extends: | ||
file: docker-compose.docs.yml | ||
service: docs | ||
image: taccwma/frontera-docs:latest | ||
volumes: | ||
- /var/www/portal/docs:/docs/site | ||
command: ["mkdocs", "build"] | ||
container_name: portal_user_guide | ||
logging: | ||
driver: syslog | ||
options: | ||
tag: portal_user_guide | ||
|
||
memcached: | ||
extends: | ||
file: docker-compose.memcached.yml | ||
service: memcached | ||
|
||
redis: | ||
extends: | ||
file: docker-compose.redis.yml | ||
service: redis | ||
|
||
rabbitmq: | ||
extends: | ||
file: docker-compose.rabbitmq.yml | ||
service: rabbitmq | ||
|
||
websockets: | ||
extends: | ||
file: docker-compose.websockets.yml | ||
service: websockets | ||
|
||
core: | ||
extends: | ||
file: docker-compose.core.yml | ||
service: core | ||
|
||
workers: | ||
extends: | ||
file: docker-compose.workers.yml | ||
service: workers | ||
|
||
cms: | ||
extends: | ||
file: docker-compose.cms.yml | ||
service: cms | ||
|
||
volumes: | ||
portal_es_data: | ||
portal_redis_data: | ||
portal_rabbitmq_data: | ||
|
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,19 @@ | ||
version: "3.8" | ||
services: | ||
core: | ||
image: ${PORTAL_IMAGE}:${PORTAL_TAG} | ||
volumes: | ||
- ${CAMINO_HOME}/conf/portal/settings_secret.py:/srv/www/portal/server/portal/settings/settings_secret.py | ||
- ${CAMINO_HOME}/conf/portal/settings_custom.py:/srv/www/portal/server/portal/settings/settings_custom.py | ||
- /var/www/portal/portal/media:/srv/www/portal/server/media | ||
- /var/www/portal/portal/static:/srv/www/portal/server/static | ||
- ${CAMINO_HOME}/conf/uwsgi/uwsgi_core.ini:/srv/www/portal/server/conf/uwsgi/uwsgi_core.ini | ||
stdin_open: true | ||
tty: true | ||
command: uwsgi --ini /srv/www/portal/server/conf/uwsgi/uwsgi_core.ini | ||
container_name: portal_django | ||
logging: | ||
driver: syslog | ||
options: | ||
tag: portal_django | ||
restart: always |
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,6 @@ | ||
version: "3.8" | ||
services: | ||
docs: | ||
image: taccwma/frontera-docs:latest | ||
command: ["mkdocs", "build"] | ||
container_name: portal_user_guide |
Oops, something went wrong.