Skip to content

Commit

Permalink
Merge branch '2019-09-29_internal_release'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Sep 29, 2019
2 parents 04252b5 + 2acf12e commit b973e9a
Show file tree
Hide file tree
Showing 280 changed files with 13,288 additions and 5,410 deletions.
28 changes: 0 additions & 28 deletions .env

This file was deleted.

15 changes: 0 additions & 15 deletions .env.production.example

This file was deleted.

96 changes: 96 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Solr setting
SOLR_URL_SCHEME=http
SOLR_HOST=solr
SOLR_PORT=8983
SOLR_CORE=hyrax_production

# Database setting
POSTGRES_HOST_APP=appdb
POSTGRES_HOST_FCREPO=fcrepodb
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_DB_APP=hyrax_production
POSTGRES_DB_FCREPO=fcrepo

# Redis setting
REDIS_HOST=redis
REDIS_PORT=6379

# Fedora setting
FEDORA_URL_SCHEME=http
FEDORA_HOST=fcrepo
FEDORA_PORT=8080
# FCREPO_ENDPOINT=hyrax_production # Optional - default is production
# FCREPO_PATH='/rest' # Optional - default is /fcrepo/rest
FCREPO_VERSION=4.7.5

# RAILS setting
LANG=C.UTF-8
PORT=3000
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=true
RAILS_SERVE_STATIC_FILES=true
RAILS_MAX_THREADS=5
# The secrect key should be a very long random key.
# You can use "$ bundle exec rails secret" to generate one.
SECRET_KEY_BASE=
DEVISE_SECRET_KEY=

# Google analytics setting for the application
GOOGLE_ANALYTICS_ID=
GA_APP_NAME=
GA_APP_VERSION=
GA_PRIVATE_KEY_PATH=
GA_PRIVATE_KEY_SECRET=
GA_CLIENT_EMAIL=

# Hyrax application setting
DERIVATIVES_PATH=/shared/derivatives/
FITS_PATH=/fits/fits-1.3.0/fits.sh
# fits_version should appear exactly like this, including fits-
FITS_VERSION=fits-1.3.0
UPLOADS_PATH=/shared/uploads/
CACHE_PATH=/shared/cache/
DEFAULT_DATE_FORMAT=%d/%m/%Y
NOTIFICATIONS_EMAIL_DEFAULT_FROM_ADDRESS="no-reply@mailboxer.com"
USER_MANAGEMENT_EMAIL_FROM_ADDRESS=repo-admin@example.org
CONTACT_FORM_SUBJECT_PREFIX=Hyrax Contact form:
CONTACT_EMAIL=
FROM_EMAIL=
SMTP_PASS=
GEONAMES=
IIIF_SEARCH_ENDPOINT=
CONFIG_IIIF_IMAGE_ENDPOINT=
# If the rails server is configured to serve requests in https, set this to true
IIIF_TO_SERVE_SSL_URLS=false

# errbit setup
# Host where errbit server is installed. Start with http or https
AIRBRAKE_HOST=
# Any positive integer should work
AIRBRAKE_PROJECT_ID=
# The project key to authorize loggint with errbit server
AIRBRAKE_PROJECT_KEY=

# Browse Everything credentials
GOOGLE_DRIVE_CLIENT_ID=
GOOGLE_DRIVE_CLIENT_SECRET=
BOX_CLIENT_ID=
BOX_CLIENT_SECRET=

# Choose one of the following authentication methods.
# (database_authenticatable is pre-configured and useful for a development environment)
MDR_DEVISE_AUTH_MODULE=ldap_authenticatable
# MDR_DEVISE_AUTH_MODULE=database_authenticatable

LDAP_HOST=***REMOVED***
LDAP_PORT=443
LDAP_ATTRIBUTE=uid
LDAP_BASE=***REMOVED***
LDAP_ADMIN_USER=***REMOVED***
LDAP_ADMIN_PASSWORD=***REMOVED***
LDAP_SSL=false

SMTP_HOST=
SMTP_PORT=
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ capybara-*.html
/db/*.sqlite3-journal
/public/system
/coverage/
/hyrax/coverage
/spec/tmp
*.orig
rerun.txt
pickle-email-*.html
hyrax/docs

# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
config/initializers/secret_token.rb
Expand Down Expand Up @@ -343,4 +345,7 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk

# Environment variables file
.env.production
.env
195 changes: 174 additions & 21 deletions README.md

Large diffs are not rendered by default.

29 changes: 4 additions & 25 deletions docker-compose-production.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
# Overrides the docker-compose file for production environment
# - Adds nginx with basic auth in front of the app
# - Production env file for the app
# - app accessible on port 3000

version: '2.1'

volumes:
nginx:
version: '3'

services:

app:
env_file:
- .env.production
volumes:
- /mnt/ngdr/:/mnt/ngdr

nginx:
image: nginx:stable-alpine
depends_on:
- web
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/.htpasswd:/etc/nginx/conf.d/.htpasswd:ro
web:
ports:
- 81:80
- 3000:80
#- 443:443
networks:
internal:
- 3000:3000
29 changes: 24 additions & 5 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,40 @@

# todo: nginx to serve static files

version: '2.1'
version: '3'

volumes:
file_uploads:
derivatives:
cache:
fcrepo:
redis:

services:

app:
env_file:
- .env.production.example
fcrepo:
ports:
- 8080:8080
volumes:
- fcrepo:/data

solr:
ports:
- 8983:8983

app:
volumes:
- file_uploads:${UPLOADS_PATH}
- derivatives:${DERIVATIVES_PATH}
- cache:${CACHE_PATH}
- /srv/ngdr/data/:/data/data

web:
ports:
- 3000:3000
- 3000:3000
environment:
- RAILS_FORCE_SSL=false

redis:
volumes:
- redis:/data
Loading

0 comments on commit b973e9a

Please sign in to comment.