Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Computer Resources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Computer Resources
Commits
35e46a16
Commit
35e46a16
authored
2 months ago
by
Michael Blaschek
Browse files
Options
Downloads
Patches
Plain Diff
updated Dockerfile and gitlab ci
parent
ab543514
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-23
19 additions, 23 deletions
.gitlab-ci.yml
Dockerfile
+19
-6
19 additions, 6 deletions
Dockerfile
with
38 additions
and
29 deletions
.gitlab-ci.yml
+
19
−
23
View file @
35e46a16
# image: python:3.10-buster
image
:
harbor.wolke.img.univie.ac.at/podman/mkdocs-computer:latest
# variables:
# PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Cache between jobs in the same branch
cache
:
-
key
:
$CI_COMMIT_REF_SLUG
# - paths:
# - .cache/pip
stages
:
-
build
-
deploy
create-image
:
image
:
quay.io/podman/stable
stage
:
build
rules
:
-
changes
:
-
Dockerfile
-
requirements.txt
script
:
-
podman build -t registry.phaidra.org/imgw/computer-resources:latest .
-
podman login registry.phaidra.org -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
-
podman push registry.phaidra.org/imgw/computer-resources:latest
build
:
image
:
$CI_REGISTRY/imgw/computer-resources:latest
stage
:
build
# when: manual
# before_script:
# Install all required packages
# - apt-get update -y
# - apt-get install -y -qq graphviz
# - pip install -r requirements.txt
script
:
# --strict is too strict :)
-
mkdocs build -c --verbose
...
...
@@ -29,16 +24,17 @@ build:
expire_in
:
1 hour
paths
:
-
site/
cache
:
-
key
:
$CI_COMMIT_REF_SLUG
deploy
:
image
:
$CI_REGISTRY/imgw/computer-resources:latest
stage
:
deploy
# when: manual
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
"master"'
needs
:
-
build
# before_script:
# - apt-get update -qq && apt-get install -y -qq sshpass openssh-client rsync
script
:
# - sshpass -p "$WOLKE_PASSWORD" scp -oStrictHostKeyChecking=no -r ./site/* $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/
-
sshpass -p "$WOLKE_PASSWORD" rsync -autv --delete -e "ssh -o StrictHostKeyChecking=no" ./site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general
cache
:
-
key
:
$CI_COMMIT_REF_SLUG
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Dockerfile
+
19
−
6
View file @
35e46a16
FROM
python:3.10-
buster
FROM
python:3.10-
slim
ADD
requirements.txt /requirements.txt
RUN
apt-get update
-y
\
&&
apt-get
install
-y
-qq
graphviz sshpass openssh-client rsync
\
&&
pip
install
-r
requirements.txt
WORKDIR
/app
ADD
. /app
EXPOSE
8000
CMD
["mkdocs", "serve", "-a", "0.0.0.0:8000"]
\ No newline at end of file
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists/
*
\
&&
rm
-rf
/tmp/
*
/var/tmp/
*
RUN
pip
install
--no-cache-dir
-r
requirements.txt
# WORKDIR /app
# ADD . /app
# EXPOSE 8000
# CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
# this is a larger image?
# FROM python:3.10-alpine
# ADD requirements.txt /requirements.txt
# RUN apk add --update graphviz sshpass openssh-client rsync gcc python3-dev musl-dev linux-headers\
# && pip install --no-cache-dir -r requirements.txt
# WORKDIR /app
# ADD . /app
# EXPOSE 8000
# CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
\ No newline at end of file
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