Merge branch 'devel' into 'master'

Merge latest devel tree

See merge request oliver/ivatar!214
This commit is contained in:
Oliver Falk
2022-11-17 10:54:20 +00:00
3 changed files with 45 additions and 3 deletions

3
.gitignore vendored
View File

@@ -17,3 +17,6 @@ locale/*/LC_MESSAGES/django.mo
.idea/
contacts.csv
falko_gravatar.jpg
*.egg-info
dump_all*.sql
dist/

View File

@@ -1,6 +1,7 @@
image:
name: quay.io/rhn_support_ofalk/fedora35-python3
entrypoint: [ '/bin/sh', '-c' ]
default:
image:
name: quay.io/rhn_support_ofalk/fedora35-python3
entrypoint: [ '/bin/sh', '-c' ]
before_script:
- virtualenv -p python3 /tmp/.virtualenv
@@ -54,3 +55,24 @@ pages:
expire_in: 14 days
only:
- master
build-image:
image: docker
services:
- docker:dind
before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- ls -lah
- |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}"

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM quay.io/rhn_support_ofalk/fedora35-python3
LABEL maintainer Oliver Falk <oliver@linux-kernel.at>
EXPOSE 8081
RUN pip3 install pip --upgrade
ADD . /opt/ivatar-devel
WORKDIR /opt/ivatar-devel
RUN pip3 install Pillow && pip3 install -r requirements.txt && pip3 install python-coveralls coverage pycco django_coverage_plugin
RUN echo "DEBUG = True" >> /opt/ivatar-devel/config_local.py
RUN echo "EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'" >> /opt/ivatar-devel/config_local.py
RUN python3 manage.py migrate && python3 manage.py collectstatic --noinput
RUN echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@local.tld', 'admin')" | python manage.py shell
ENTRYPOINT python3 ./manage.py runserver 0:8081