-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1 from scientist-softserv/with-docker-dev
add dockerfile/internal-test config/docker-compose
- Loading branch information
Showing
9 changed files
with
200 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ENGINE_CART_DESTINATION='.internal_test_app' | ||
SOLR_URL=http://solr:8983/solr | ||
FCREPO_URL=http://fcrepo:8080 | ||
REDIS_HOST=redis |
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 |
---|---|---|
|
@@ -45,3 +45,4 @@ fcrepo-webapp-* | |
# ignore gem builds | ||
*.gem | ||
pkg/ | ||
*~undo-tree~ |
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,15 @@ | ||
FROM ghcr.io/scientist-softserv/dev-ops/samvera:e9200061 as hyku-base | ||
USER root | ||
RUN apk add --no-cache sqlite chromium-chromedriver | ||
USER app | ||
|
||
RUN sh -l -c " \ | ||
git config --global --add safe.directory /app/samvera/hyrax-webapp && \ | ||
bundle config set --global force_ruby_platform ruby" | ||
|
||
COPY --chown=1001:101 $APP_PATH/Gemfile* /app/samvera/hyrax-webapp/ | ||
COPY --chown=1001:101 $APP_PATH/*.gemspec /app/samvera/hyrax-webapp/ | ||
COPY --chown=1001:101 $APP_PATH/lib/newspaper_works/version.rb /app/samvera/hyrax-webapp/lib/newspaper_works/ | ||
RUN bundle install --jobs "$(nproc)" | ||
|
||
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp |
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,126 @@ | ||
version: '3.8' | ||
|
||
x-app: &app | ||
build: | ||
context: . | ||
target: hyku-base | ||
args: | ||
- EXTRA_APK_PACKAGES=less vim bash openjdk11-jre ffmpeg rsync exiftool | ||
# image: ghcr.io/scientist-softserv/palni-palci:${TAG:-latest} | ||
env_file: | ||
- .env | ||
# NOTE: all common env variables moved to .env | ||
volumes: | ||
- node_modules:/app/samvera/hyrax-webapp/node_modules:cached | ||
- uploads:/app/samvera/hyrax-webapp/public/uploads:cached | ||
- assets:/app/samvera/hyrax-webapp/public/assets:cached | ||
- cache:/app/samvera/hyrax-webapp/tmp/cache:cached | ||
- .:/app/samvera/hyrax-webapp | ||
networks: | ||
internal: | ||
|
||
volumes: | ||
assets: | ||
cache: | ||
db: | ||
fcrepo: | ||
node_modules: | ||
redis: | ||
solr: | ||
uploads: | ||
zk: | ||
zoo: | ||
|
||
networks: | ||
internal: | ||
|
||
services: | ||
solr: | ||
image: solr:7.7.2 | ||
environment: | ||
- VIRTUAL_PORT=8983 | ||
- VIRTUAL_HOST=solr.iiif_print.test | ||
ports: | ||
- 8983:8983 | ||
command: | ||
- sh | ||
- "-c" | ||
- "precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf; solr-precreate hyrax /opt/solr/server/configsets/hyraxconf" | ||
volumes: | ||
- solr:/var/solr/data:cached | ||
- .internal_test_app/solr/conf:/opt/solr/server/configsets/hyraxconf | ||
networks: | ||
- internal | ||
|
||
fcrepo: | ||
image: ghcr.io/samvera/fcrepo4:4.7.5 | ||
volumes: | ||
- fcrepo:/data:cached | ||
env_file: | ||
- .env | ||
environment: | ||
- VIRTUAL_PORT=8080 | ||
- VIRTUAL_HOST=fcrepo.hyku.test | ||
- JAVA_OPTS=${JAVA_OPTS} -Dfcrepo.modeshape.configuration="classpath:/config/file-simple/repository.json" -Dfcrepo.object.directory="/data/objects" -Dfcrepo.binary.directory="/data/binaries" | ||
expose: | ||
- 8080 | ||
networks: | ||
internal: | ||
|
||
db: | ||
image: postgres:11.1 | ||
env_file: | ||
- .env | ||
environment: | ||
- POSTGRES_DB=${DB_NAME} | ||
- POSTGRES_PASSWORD=${DB_PASSWORD} | ||
- POSTGRES_USER=${DB_USER} | ||
- VIRTUAL_PORT=5432 | ||
- VIRTUAL_HOST=db.hyku.test | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
networks: | ||
internal: | ||
|
||
web: | ||
<<: *app | ||
environment: | ||
- VIRTUAL_PORT=3000 | ||
- VIRTUAL_HOST=.hyku.test | ||
command: tail -f /dev/null | ||
depends_on: | ||
db: | ||
condition: service_started | ||
solr: | ||
condition: service_started | ||
fcrepo: | ||
condition: service_started | ||
redis: | ||
condition: service_started | ||
chrome: | ||
condition: service_started | ||
expose: | ||
- 3000 | ||
|
||
redis: | ||
image: redis:5 | ||
command: redis-server | ||
volumes: | ||
- redis:/data | ||
networks: | ||
internal: | ||
|
||
chrome: | ||
# password is 'secret' | ||
image: selenium/standalone-chrome-debug:3.141.59-20201010 | ||
logging: | ||
driver: none | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
shm_size: 3G | ||
networks: | ||
internal: | ||
environment: | ||
- JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps= | ||
- VIRTUAL_PORT=7900 | ||
- VIRTUAL_HOST=chrome.hyku.test |
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,9 @@ | ||
development: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] %>/hyrax | ||
test: &test | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] %>/hyrax_test | ||
production: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %> |
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,15 @@ | ||
development: | ||
user: fedoraAdmin | ||
password: fedoraAdmin | ||
url: <%= ENV['FCREPO_URL'] %>/rest | ||
base_path: /dev | ||
test: | ||
user: fedoraAdmin | ||
password: fedoraAdmin | ||
url: <%= ENV['FCREPO_URL'] %>/rest | ||
base_path: /test | ||
production: | ||
user: fedoraAdmin | ||
password: fedoraAdmin | ||
url: http://127.0.0.1:8983/fedora/rest | ||
base_path: /prod |
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,9 @@ | ||
development: | ||
host: <%= ENV['REDIS_HOST'] || 'localhost' %> | ||
port: 6379 | ||
test: | ||
host: <%= ENV['REDIS_HOST'] || 'localhost' %> | ||
port: 6379 | ||
production: | ||
host: <%= ENV['REDIS_HOST'] || 'localhost' %> | ||
port: 6379 |
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 @@ | ||
# This is a sample config file that points to a solr server for each environment | ||
development: | ||
url: <%= ENV['SOLR_URL'] %>/hyrax | ||
test: | ||
url: <%= ENV['SOLR_URL'] %>/hyrax_test | ||
production: | ||
url: <%= ENV['SOLR_URL'] || "http://your.production.server:8080/bl_solr/core0" %> |
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