This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker support added for warclight. (#224)
- Loading branch information
Showing
4 changed files
with
76 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,39 @@ | ||
ARG ALPINE_RUBY_VERSION=3.14 | ||
|
||
FROM ruby:alpine${ALPINE_RUBY_VERSION} | ||
|
||
RUN apk add --update --no-cache \ | ||
bash \ | ||
build-base \ | ||
git \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
nodejs \ | ||
yarn \ | ||
shared-mime-info \ | ||
sqlite-dev \ | ||
tzdata | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
RUN gem update --system && \ | ||
gem install bundler && \ | ||
bundle config build.nokogiri --use-system-libraries | ||
|
||
RUN gem install rails | ||
|
||
COPY template.rb . | ||
|
||
RUN rails new warclight -m template.rb | ||
|
||
WORKDIR /app/warclight | ||
|
||
COPY docker-entrypoint.sh /usr/bin/ | ||
RUN chmod +x /usr/bin/docker-entrypoint.sh | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["rails", "server", "-b", "0.0.0.0"] | ||
|
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,21 @@ | ||
version: "3.7" | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
- ALPINE_RUBY_VERSION=3.14 | ||
depends_on: | ||
- solr | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- SOLR_URL='http://solr:8983/solr/discovery' | ||
- RAILS_VERSION= 5.2.4.1 | ||
|
||
solr: | ||
image: ukwa/webarchive-discovery-solr | ||
ports: | ||
- "8983:8983" |
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,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
rm -f /app/.internal_test_app/tmp/pids/server.pid | ||
exec "$@" |