Skip to content

Draft docker deploy for OBO site #1805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM jekyll/jekyll:3.5.2

LABEL maintainer OBOFoundry<obo-discuss@googlegroups.com>

ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
COPY requirements.txt requirements.txt
RUN apk add python3-dev
RUN pip3 install --no-cache -r requirements.txt
#RUN pip3 install --no-cache --upgrade pip setuptools frontmatter

RUN mkdir -p /tools/
ENV PATH "/tools/apache-jena/bin:/tools/sparqlprog/bin:$PATH"
# Install Jena.
RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-3.12.0.tar.gz -O- | tar xzC /tools && \
mv /tools/apache-jena-3.12.0 /tools/apache-jena

RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community


CMD make all && jekyll serve
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,32 @@ jenkins-output.txt:

reports/%.csv: registry/ontologies.ttl sparql/%.sparql
arq --data $< --query sparql/$*.sparql --results csv > $@.tmp && mv $@.tmp $@

################################################
#### Commands for building the Docker image ####
################################################
VERSION = "0.0.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not very descriptive. Suggetion: OBOFOUNDRY_IMAGE_VERSION

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not review draft pull requests :P

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops I didn't look at the flag

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'd hate working on one of my open source projects

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its like looking at someone six pack in progress under their t-shirt on January 10.

IM=obolibrary/site
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cryptic variable name

docker-build-no-cache:
@docker build --no-cache -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-build:
@docker build -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-build-use-cache-dev:
@docker build -t $(DEV):$(VERSION) . \
&& docker tag $(DEV):$(VERSION) $(DEV):latest
docker-clean:
docker kill $(IM) || echo not running ;
docker rm $(IM) || echo not made
docker-publish-no-build:
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest

docker-publish-dev-no-build:
@docker push $(DEV):$(VERSION) \
&& docker push $(DEV):latest

docker-publish: docker-build
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest
2 changes: 2 additions & 0 deletions docker_site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
docker run -v $PWD/:/srv/jekyll/ -p 4000:4000 --rm -it obolibrary/site
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy