Skip to content

Commit

Permalink
track environment files for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
rococodogs committed Sep 16, 2024
1 parent 4e9420b commit 4e7a8c8
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 120 deletions.
109 changes: 0 additions & 109 deletions .env.sample

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
# Ignore .env files
.env*
!.env.sample
docker.env.local


# Ignore coverage generated by SimpleCov
/coverage*
Expand Down
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ gem 'devise', '~> 4.9.0'
gem 'devise_cas_authenticatable', '~> 2.0.2'
gem 'devise-guests', '~> 0.8.1'

# we're using .env files to manage our secrets
gem 'dotenv-rails', '~> 2.7.6'

# extended date formats
gem 'edtf', '~> 3.1.1'
gem 'edtf-humanize', '~> 2.1.0'
Expand Down
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ GEM
uber (< 0.2.0)
docile (1.4.0)
docopt (0.5.0)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
draper (4.0.2)
actionpack (>= 5.0)
activemodel (>= 5.0)
Expand Down Expand Up @@ -1105,7 +1101,6 @@ DEPENDENCIES
devise (~> 4.9.0)
devise-guests (~> 0.8.1)
devise_cas_authenticatable (~> 2.0.2)
dotenv-rails (~> 2.7.6)
edtf (~> 3.1.1)
edtf-humanize (~> 2.1.0)
equivalent-xml (~> 0.6.0)
Expand Down
21 changes: 18 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ services:
ports:
- "443:443"
env_file:
- .env.local
- path: ./docker.env
required: true
- path: ./docker.env.local
required: false
- path: .env.local
required: false
depends_on:
- cantaloupe
- db
Expand Down Expand Up @@ -54,7 +59,12 @@ services:
db_migrate:
image: lafayette/spot-web
env_file:
- .env.local
- path: ./docker.env
required: true
- path: ./docker.env.local
required: false
- path: .env.local
required: false
entrypoint: ["sh", "-c"]
command: bin/migrate-and-seed-db.sh
depends_on:
Expand Down Expand Up @@ -110,7 +120,12 @@ services:
context: .
target: spot-worker-development
env_file:
- .env.local
- path: ./docker.env
required: true
- path: ./docker.env.local
required: false
- path: .env.local
required: false
environment:
- FITS_SERVLET_URL=http://fits-servlet:8080/fits
ports:
Expand Down
41 changes: 41 additions & 0 deletions docker.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Environment variables for the local Docker environment.
# Override these values using a `docker.env.local` file.
#

AWS_ACCESS_KEY_ID=minio_root_user
AWS_SECRET_ACCESS_KEY=minio_root_password
AWS_REGION=us-east-1
AWS_ENDPOINT_URL="http://minio:9000"
AWS_IIIF_ASSET_BUCKET=iiif-derivatives
AWS_BULKRAX_IMPORTS_BUCKET=ldr-imports

# FCRepo connection info
FEDORA_URL=http://fedora:8080/rest
FEDORA_TEST_URL=http://fedora:8080/rest

FITS_SERVLET_URL=http://fits-servlet:8080/fits

HYRAX_DERIVATIVES_PATH=/spot/tmp/derivatives

IIIF_BASE_URL=http://localhost:8182/iiif/2

PSQL_PASSWORD=spot_dev_pw
PSQL_HOST=db
PSQL_USER=spot_dev_user
PSQL_DATABASE=spot_dev

RAILS_ENV=development
RAILS_LOG_TO_STDOUT="true"
RAILS_SERVE_STATIC_FILES="1"

REDIS_URL=redis://redis:6379
REDIS_PASSWORD=""

SECRET_KEY_BASE=localshhh

SOLR_URL=http://solr:8983/solr/spot-development
SOLR_TEST_URL=http://solr:8983/solr/spot-test

VALKYRIE_SOLR_HOST=solr
VALKYRIE_SOLR_CORE=spot-development
11 changes: 11 additions & 0 deletions docker.env.local.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Host name for the application. For CAS integration, this needs to be a recognized service.
APPLICATION_FQDN=
URL_HOST=https://$APPLICATION_FQDN

# Base URL for Campus Authorization System (?) login
CAS_BASE_URL=

# Admin users to create during db:seed;
# use your @lafayette.edu address, separate with commas if creating multiples
DEV_ADMIN_USERS=

0 comments on commit 4e7a8c8

Please sign in to comment.