Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Software Heritage virtual environment packaging manifests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Lambert
Software Heritage virtual environment packaging manifests
Commits
0042c276
Commit
0042c276
authored
1 year ago
by
Guillaume Samson
Browse files
Options
Downloads
Patches
Plain Diff
swh-scheduler: Add image
parent
252a4de0
No related branches found
Branches containing commit
Tags
v4.3.0
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/swh-scheduler/Dockerfile
+34
-0
34 additions, 0 deletions
apps/swh-scheduler/Dockerfile
apps/swh-scheduler/entrypoint.sh
+24
-0
24 additions, 0 deletions
apps/swh-scheduler/entrypoint.sh
apps/swh-scheduler/requirements.txt
+1
-0
1 addition, 0 deletions
apps/swh-scheduler/requirements.txt
with
59 additions
and
0 deletions
apps/swh-scheduler/Dockerfile
0 → 100644
+
34
−
0
View file @
0042c276
# Deeply inspired from the Dockerfile of the swh-storage project
FROM
python:3.10-bullseye
RUN
apt-get
-y
update
&&
\
apt-get
-y
upgrade
&&
\
apt-get
install
-y
libcmph-dev librdkafka-dev
&&
\
apt clean
&&
\
addgroup
--gid
1000 swh
&&
\
useradd
--gid
1000
--uid
1000
-m
-d
/opt/swh swh
&&
\
mkdir
/etc/swh
USER
swh
WORKDIR
/opt/swh
COPY
--chown=swh:swh requirements-frozen.txt /opt/swh
COPY
--chown=swh:swh entrypoint.sh /opt/swh
ENV
PYTHONPATH=/opt/swh
ENV
PATH=/opt/swh/.local/bin:$PATH
RUN
chmod
u+x /opt/swh/entrypoint.sh
&&
\
/usr/local/bin/python
-m
pip
install
--upgrade
pip
&&
\
pip
install
--no-cache-dir
-r
requirements-frozen.txt
&&
\
pip
install
gunicorn
ENV
SWH_CONFIG_FILENAME=/etc/swh/config.yml
ENV
PORT 5008
EXPOSE
$PORT
ENV
LOG_LEVEL INFO
ENV
THREADS 2
ENV
WORKERS 2
ENV
TIMEOUT 3600
ENTRYPOINT
["/opt/swh/entrypoint.sh"]
This diff is collapsed.
Click to expand it.
apps/swh-scheduler/entrypoint.sh
0 → 100644
+
24
−
0
View file @
0042c276
#!/bin/bash
set
-e
case
"
$1
"
in
"shell"
)
shift
if
((
$#
==
0
))
;
then
exec
bash
-i
else
"
$@
"
fi
;;
*
)
echo
Starting the swh-scheduler API server
exec
gunicorn
--bind
0.0.0.0:5008
\
--log-level
${
LOG_LEVEL
}
\
--threads
${
THREADS
}
\
--workers
${
WORKERS
}
\
--reload
\
--timeout
${
TIMEOUT
}
\
--config
'python:swh.core.api.gunicorn_config'
\
'swh.scheduler.api.server:make_app_from_configfile()'
esac
This diff is collapsed.
Click to expand it.
apps/swh-scheduler/requirements.txt
0 → 100644
+
1
−
0
View file @
0042c276
swh.scheduler
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment