-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reusable-workflows): ✨ codebook profile image template
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
.github/docker-template/codebook-profile/codebook.Dockerfile
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,23 @@ | ||
## docker build --build-arg JHUB_VER=4.0.2 --build-arg PY_VER=3.10 --build-arg DEPLOY_KEY=wt-ephys-no-curation-deploy.pem --build-arg REPO_OWNER=dj-sciops --build-arg REPO_NAME=wt-ephys-no-curation -f codebook.Dockerfile -t registry.vathes.com/sciops/codebook-wt-ephys-no-curation:v0.0.0 . | ||
|
||
## Single Stage | ||
ARG JHUB_VER | ||
ARG PY_VER | ||
ARG DIST | ||
FROM datajoint/djlabhub:singleuser-${JHUB_VER}-py${PY_VER} | ||
|
||
ARG DEPLOY_KEY | ||
COPY --chown=jovyan $DEPLOY_KEY $HOME/.ssh/id_ed25519 | ||
RUN chmod 400 $HOME/.ssh/id_ed25519 | ||
|
||
ARG REPO_OWNER | ||
ARG REPO_NAME | ||
WORKDIR /tmp | ||
RUN ssh-keyscan -t ed25519 github.com >> $HOME/.ssh/known_hosts && \ | ||
git clone [email protected]:${REPO_OWNER}/${REPO_NAME}.git && \ | ||
pip install ./${REPO_NAME} && \ | ||
mv ./${REPO_NAME}/* /home/jovyan/ && \ | ||
rm -rf /tmp/${REPO_NAME} && \ | ||
rm -rf $HOME/.ssh/ | ||
|
||
WORKDIR /home/jovyan |
15 changes: 15 additions & 0 deletions
15
.github/docker-template/codebook-profile/docker-compose.yaml
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,15 @@ | ||
# cd ./docker-template/codebook_env && set -a && source .env && docker-compose -f dist/debian/docker-compose-codebook_env.yaml build | ||
version: '2.4' | ||
services: | ||
codebook_env: | ||
build: | ||
# only necessary if rebuilding image | ||
context: . | ||
dockerfile: codebook.Dockerfile | ||
args: | ||
- JHUB_VER | ||
- PY_VER | ||
- DEPLOY_KEY | ||
- REPO_OWNER | ||
- REPO_NAME | ||
image: registry.vathes.com/sciops/codebook_${REPO_NAME}:singleuser-${JHUB_VER}-py${PY_VER}-${WORKFLOW_VERSION} |
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,6 @@ | ||
JHUB_VER=4.0.2 | ||
PY_VER=3.10 | ||
DEPLOY_KEY=<path> | ||
REPO_OWNER=<github org> | ||
REPO_NAME=<github repo> | ||
WORKFLOW_VERSION=<workflow version.py> |
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 +1,5 @@ | ||
.DS_Store | ||
.DS_Store | ||
|
||
*.pem | ||
*.env | ||
!example.env |