-
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.
Merge branch 'main' of github.com:TACC/Core-CMS-Custom
- Loading branch information
Showing
14 changed files
with
258 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: A2CPS CMS Builds | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'a2cps_cms/**' | ||
|
||
jobs: | ||
build_commit: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: a2cps_cms | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get shortsha | ||
id: vars | ||
run: | | ||
if [ -z "$EVENT_SHA" ]; then SHORT_SHA=${GITHUB_SHA::8}; else SHORT_SHA=${EVENT_SHA::8}; fi | ||
echo ::set-output name=sha_short::${SHORT_SHA} | ||
env: | ||
EVENT_SHA: ${{ github.event.client_payload.sha }} | ||
- name: Print shortsha | ||
run: | | ||
echo $SHORTSHA | ||
env: | ||
SHORTSHA: ${{ steps.vars.outputs.sha_short }} | ||
- uses: docker/setup-buildx-action@v2 | ||
name: Setup Docker Builds | ||
- uses: docker/login-action@v2 | ||
name: Log in to docker | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v3 | ||
name: Build & push commit tagged Docker image | ||
with: | ||
context: a2cps_cms | ||
push: true | ||
tags: taccwma/a2cps-cms:${{ steps.vars.outputs.sha_short }} |
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,4 @@ | ||
.git | ||
.cache | ||
**/secrets.py | ||
**/settings_local.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# v3.11.0 | ||
FROM taccwma/core-cms:c19e0d7 | ||
|
||
WORKDIR /code | ||
|
||
COPY /src/taccsite_custom /code/taccsite_custom | ||
COPY /src/taccsite_cms /code/taccsite_cms |
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,39 @@ | ||
DOCKERHUB_REPO := $(shell cat ./docker_repo.var) | ||
DOCKER_TAG ?= $(shell git rev-parse --short HEAD) | ||
DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG) | ||
DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest | ||
|
||
#### | ||
# `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists | ||
DOCKER_IMAGE_BRANCH := $(DOCKERHUB_REPO):$(shell git describe --exact-match --tags 2> /dev/null || git symbolic-ref --short HEAD) | ||
|
||
#.PHONY: build | ||
build: | ||
docker-compose -f docker-compose.dev.yml build | ||
|
||
.PHONY: build-full | ||
build-full: | ||
docker build -t $(DOCKER_IMAGE) --target production -f Dockerfile . | ||
docker tag $(DOCKER_IMAGE) $(DOCKER_IMAGE_BRANCH) # Note: Currently broken for branches with slashes | ||
|
||
.PHONY: publish | ||
publish: | ||
docker push $(DOCKER_IMAGE) | ||
docker push $(DOCKER_IMAGE_BRANCH) | ||
|
||
.PHONY: publish-latest | ||
publish-latest: | ||
docker tag $(DOCKER_IMAGE) $(DOCKER_IMAGE_LATEST) | ||
docker push $(DOCKER_IMAGE_LATEST) | ||
|
||
.PHONY: start | ||
start: | ||
docker-compose -f docker-compose.dev.yml up | ||
|
||
.PHONY: stop | ||
stop: | ||
docker-compose -f docker-compose.dev.yml down | ||
|
||
.PHONY: stop-full | ||
stop-v: | ||
docker-compose -f docker-compose.dev.yml down -v |
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 @@ | ||
# Example | ||
|
||
An extension of the [Core CMS](https://github.com/TACC/Core-CMS) project | ||
|
||
## Basics | ||
|
||
See [Core-CMS-Custom](https://github.com/TACC/Core-CMS-Custom#readme). |
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,56 @@ | ||
version: "3" | ||
services: | ||
cms: | ||
build: . | ||
ports: | ||
- 127.0.0.1:8000:8000 | ||
command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"] | ||
container_name: core_cms | ||
hostname: core_cms | ||
volumes: | ||
- ./src/apps:/code/apps | ||
- ./src/taccsite_custom:/code/taccsite_custom | ||
- ./src/taccsite_cms/custom_app_settings.py:/code/taccsite_cms/custom_app_settings.py | ||
- ./src/taccsite_cms/urls_custom.py:/code/taccsite_cms/urls_custom.py | ||
- ./src/taccsite_cms/settings_custom.py:/code/taccsite_cms/settings_custom.py | ||
- ./src/taccsite_cms/settings_local.py:/code/taccsite_cms/settings_local.py | ||
- ./src/taccsite_cms/secrets.py:/code/taccsite_cms/secrets.py | ||
networks: | ||
- core_cms_net | ||
|
||
postgres: | ||
image: postgres:11.5 | ||
environment: | ||
- POSTGRES_PASSWORD=taccforever | ||
- POSTGRES_USER=postgresadmin | ||
- POSTGRES_DB=taccsite | ||
- PGDATA=/var/lib/postgresql/data/taccsite | ||
volumes: | ||
- core_cms_postgres_data:/var/lib/postgresql/data | ||
hostname: core_cms_postgres | ||
container_name: core_cms_postgres | ||
networks: | ||
- core_cms_net | ||
|
||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0 | ||
ulimits: | ||
memlock: -1 | ||
environment: | ||
- ES_HEAP_SIZE:1g | ||
- discovery.type=single-node | ||
volumes: | ||
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml | ||
- core_cms_es_data:/usr/share/elasticsearch/data | ||
container_name: core_cms_elasticsearch | ||
ports: | ||
- 127.0.0.1:9201:9200 | ||
networks: | ||
- core_cms_net | ||
|
||
volumes: | ||
core_cms_postgres_data: | ||
core_cms_es_data: | ||
|
||
networks: | ||
core_cms_net: |
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 @@ | ||
#Use this to configure elasticsearch | ||
#More info: https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html | ||
# | ||
cluster.name: es-dev | ||
network.host: 0.0.0.0 | ||
#network.publish_host: hostname | ||
node.name: es01 | ||
#minimum_master_nodes need to be explicitly set when bound on a public IP | ||
# set to 1 to allow single node clusters | ||
# Details: https://github.com/elastic/elasticsearch/pull/17288 | ||
discovery.zen.minimum_master_nodes: 1 | ||
#More info about memory_lock: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html | ||
bootstrap.memory_lock: true | ||
xpack.security.enabled: false |
Empty file.
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,89 @@ | ||
# CUSTOM SETTINGS VALUES. | ||
# TACC WMA CMS SITE: | ||
# *.TAPIS-PROJECT.ORG | ||
|
||
# FAQ: Some _VARIABLES are duplicated from settings.py (but prefixed with "_") | ||
# because current infrastructure lacks ability to reference default values | ||
|
||
######################## | ||
# TACC: BRANDING | ||
######################## | ||
|
||
_NSF_BRANDING = [ | ||
"nsf", | ||
"site_cms/img/org_logos/nsf-white.png", | ||
"branding-nsf", | ||
"https://www.nsf.gov/", | ||
"_blank", | ||
"NSF Logo", | ||
"anonymous", | ||
"True" | ||
] | ||
|
||
_TACC_BRANDING = [ | ||
"tacc", | ||
"site_cms/img/org_logos/tacc-white.png", | ||
"branding-tacc", | ||
"https://www.tacc.utexas.edu/", | ||
"_blank", | ||
"TACC Logo", | ||
"anonymous", | ||
"True" | ||
] | ||
|
||
_UTEXAS_BRANDING = [ | ||
"utexas", | ||
"site_cms/img/org_logos/utaustin-white.png", | ||
"branding-utaustin", | ||
"https://www.utexas.edu/", | ||
"_blank", | ||
"University of Texas at Austin Logo", | ||
"anonymous", | ||
"True" | ||
] | ||
|
||
UHAWAII_BRANDING = [ | ||
"uhawaii", | ||
"tapisproject_cms/img/org_logos/hawaii-header-trimmed.png", | ||
"branding-uhawaii", | ||
"https://www.hawaii.edu/", | ||
"_blank", | ||
"University of Hawaii Logo", | ||
"anonymous", | ||
"True" | ||
] | ||
|
||
BRANDING = [ _NSF_BRANDING, _TACC_BRANDING, _UTEXAS_BRANDING, UHAWAII_BRANDING ] | ||
|
||
######################## | ||
# TACC: LOGOS | ||
######################## | ||
|
||
LOGO = [ | ||
"tapis", | ||
"tapisproject_cms/img/org_logos/tapis-logo-navbar.png", | ||
"", | ||
"/", | ||
"_self", | ||
"Tapis Logo", | ||
"anonymous", | ||
"True" | ||
] | ||
|
||
FAVICON = { | ||
"img_file_src": "site_cms/img/favicons/favicon.ico" | ||
} | ||
|
||
######################## | ||
# TACC: PORTAL | ||
######################## | ||
|
||
INCLUDES_CORE_PORTAL = False | ||
INCLUDES_PORTAL_NAV = False | ||
INCLUDES_SEARCH_BAR = False | ||
|
||
######################## | ||
# TACC: GOOGLE ANALYTICS | ||
######################## | ||
|
||
GOOGLE_ANALYTICS_PROPERTY_ID = "G-5EQ8Y25ZTM" |
Empty file.
Binary file added
BIN
+33.7 KB
...cms/src/taccsite_custom/tapisproject_cms/static/tapisproject_cms/img/favicons/favicon.ico
Binary file not shown.
Binary file added
BIN
+45.5 KB
...apisproject_cms/static/tapisproject_cms/img/org_logos/hawaii-header-trimmed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.5 KB
...om/tapisproject_cms/static/tapisproject_cms/img/org_logos/tapis-logo-navbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.