-
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.
* use Hyrax docker base setup Hyrax now provides a minimal base docker image, intended to be reused and extended by applications. this is a proposal to replace the existing Dockerfile with one based on that image. this would switch the application server to `puma`. our thinking is that real containerized deployments (e.g. via the Helm chart) are likely to be behind a load balancer and an `nginx` (an ingress controller). the image is kept minimal with the idea that a smaller set of system dependencies means a lower footprint for security risks, besides the bandwidth and storage convenince. Hyrax's setup definitely has space to improve here, but the idea is greater consolidation will help the community maintain something really solid. there's still a little work to do here: - remove dependency on `zk` (and therefore java runtime). - refine & use Hyrax's `hyrax-worker` image setup for `sidekiq` workers (using a separate lets us consider optimizations like `MALLOC_ARENA_MAX=2`). - systematically reconcile environment variables (the job here is a bit patchwork). if this is looking like a good direction, I can work on getting this working with the upstream helm chart as well. * add a .dockerignore ignore unneeded files for image builds. * remove `zk` dependency and .ebextensions * remove StandardFilterFactory this filter factory has been a no-op since Solr 3.1. remove it. * setup solr configuration in docker-compose environment use the Hyrax utility scripts to manage solr collection and configset in the docker-compose dev environment.
- Loading branch information
tamsin johnson
authored
Apr 26, 2021
1 parent
5b97f1d
commit 9fb97d6
Showing
26 changed files
with
138 additions
and
445 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.git | ||
./tmp | ||
./log | ||
.internal_test_app/* | ||
|
||
*.rdb | ||
|
||
tmp/* | ||
artifacts/* | ||
coverage/* | ||
chart/* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 +1,12 @@ | ||
FROM hyku/base:latest | ||
|
||
ADD https://time.is/just build-time | ||
COPY ops/nginx.sh /etc/service/nginx/run | ||
COPY ops/webapp.conf /etc/nginx/sites-enabled/webapp.conf | ||
COPY ops/env.conf /etc/nginx/main.d/env.conf | ||
|
||
COPY --chown=app . $APP_HOME | ||
|
||
RUN /sbin/setuser app bash -l -c "set -x && \ | ||
(bundle check || bundle install) && \ | ||
bundle exec rake assets:precompile DB_ADAPTER=nulldb && \ | ||
mv ./public/assets ./public/assets-new" | ||
|
||
CMD ["/sbin/my_init"] | ||
ARG HYRAX_IMAGE_VERSION=3.0.1 | ||
FROM ghcr.io/samvera/hyrax/hyrax-base:$HYRAX_IMAGE_VERSION as hyku | ||
|
||
USER root | ||
RUN apk --no-cache upgrade && \ | ||
apk --no-cache add libxml2-dev \ | ||
openjdk11-jre | ||
USER app | ||
|
||
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp | ||
RUN bundle install --jobs "$(nproc)" | ||
RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.