-
Notifications
You must be signed in to change notification settings - Fork 5
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 #109 from scossu/docker
Docker
- Loading branch information
Showing
6 changed files
with
38 additions
and
29 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 |
---|---|---|
@@ -1,15 +1,33 @@ | ||
FROM python:3.7 | ||
MAINTAINER Michael B. Klein <michael.klein@northwestern.edu> | ||
RUN mkdir -p /usr/local /data | ||
WORKDIR /usr/local | ||
ADD . lakesuperior | ||
WORKDIR /usr/local/lakesuperior | ||
RUN git submodule update --init | ||
RUN [[ -f lakesuperior/model/base.c ]] || \ | ||
pip install -r requirements_dev.txt | ||
FROM python:3.7-alpine | ||
LABEL "maintainer"="Michael B. Klein <michael.klein@northwestern.edu>" \ | ||
"maintainer"="Stefano Cossu <scossu@getty.edu>" | ||
|
||
RUN apk add --no-cache build-base git | ||
RUN pip3 install cython==0.29.6 cymem | ||
|
||
RUN mkdir -p /data | ||
WORKDIR /usr/local/lsup/src | ||
COPY .git ./.git | ||
COPY ext ./ext | ||
COPY bin ./bin | ||
COPY lakesuperior ./lakesuperior | ||
COPY setup.py README.rst ./ | ||
|
||
RUN git submodule update --init ext | ||
RUN pip install -e . | ||
RUN cp ./docker/etc/* ./lakesuperior/etc.defaults/ | ||
CMD ./docker/docker_entrypoint | ||
COPY ./docker/etc ./lakesuperior/etc.defaults | ||
|
||
# Clean up build-required packages & dirs. | ||
RUN apk del build-base git | ||
RUN rm -rf .git | ||
|
||
RUN [ -f /data/ldprs_store/data.mdb ] || \ | ||
echo yes | lsup-admin bootstrap | ||
|
||
VOLUME /data | ||
|
||
EXPOSE 8000 | ||
HEALTHCHECK --interval=30s --timeout=5s \ | ||
CMD curl -X OPTIONS -f http://localhost:8000/ || exit 1 | ||
|
||
ENTRYPOINT ["gunicorn", "-c", "python:lakesuperior.wsgi", \ | ||
"lakesuperior.server:fcrepo"] | ||
#ENTRYPOINT ["./bin/fcrepo"] |
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,3 +1,3 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
gunicorn -c python:lakesuperior.wsgi lakesuperior.server:fcrepo |
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 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
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