-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (19 loc) · 958 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM ghcr.io/samvera/hyku/base:20b8c56e as hyku-knap-base
# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
RUN ln -s /app/samvera/bundler.d /app/.bundler.d
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
RUN bundle install --jobs "$(nproc)"
# Ensure root permissions for installing Tesseract data
USER root
# Install "best" training data for Tesseract
RUN echo "📚 Installing Tesseract Best (training data)!" && \
wget https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata -O /usr/share/tessdata/eng_best.traineddata
# Switch back to the non-root user for running the application
USER app
FROM hyku-knap-base as hyku-web
RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn install
CMD ./bin/web
FROM hyku-web as hyku-worker
CMD ./bin/worker