delete unused files

This commit is contained in:
2026-01-02 12:30:59 +01:00
parent c71f2ae0f1
commit c9f6b2d163
10 changed files with 0 additions and 290 deletions

View File

@@ -1,61 +0,0 @@
FROM tiangolo/uwsgi-nginx:python3.8-alpine AS builder
RUN python -m venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
RUN apk add --no-cache --virtual .build-deps ca-certificates gcc linux-headers \
musl-dev \
jpeg-dev \
zlib-dev \
libffi-dev \
mysql \
mariadb-dev \
freetype-dev \
# install for pymupdf
# && apk add --no-cache \
# libffi-dev \
# zlib-dev \
# freetype-dev \
# make \
# build-base \
# gcc \
# jbig2dec \
# jpeg-dev \
# harfbuzz-dev \
# libc-dev \
# mupdf-dev \
# musl-dev \
# openjpeg-dev \
# swig \
# && ln -s /usr/lib/libjbig2dec.so.0 /usr/lib/libjbig2dec.so \
# && pip install pymupdf==1.23.18 \
# upgrade pip
&& pip install --upgrade pip
# setting for pymupdf
# ENV PYMUPDF_SETUP_MUPDF_TESSERACT="0"
COPY ./fet2020/requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
# Remove virtual environment dependencies
# RUN apk del .builddeps
FROM tiangolo/uwsgi-nginx:python3.8-alpine
RUN apk add ghostscript-dev mariadb-connector-c
COPY --from=builder /opt/venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
#COPY ./fet2020 /app
COPY ./fet2020 /app
COPY ./assets /app/assets
COPY ./deployment/nginx.conf /etc/nginx/conf.d/fet2020.conf
#RUN python manage.py makemigrations && python manage.py makemigrations posts members

50
Jenkinsfile vendored
View File

@@ -1,50 +0,0 @@
pipeline {
agent any
stages {
stage('Checkout'){
steps {
git credentialsId: '3e336704-7d58-4dcb-88b6-1ef7b5392576', url: 'https://git.fet.at/bofh/fet2020.git'
}
}
stage('build Test') {
steps{
script {
app = docker.build("django2020test", "-f Dockerfile .")
}
}
}
stage('Test Inside') {
steps{
script {
app.inside("-u root:root") {
sh 'ls && cd fet2020 && ls && ./manage.py test'
}
}
}
}
stage('build') {
steps{
script {
app = docker.build("fet2020django", "-f Dockerfile .")
}
}
}
stage('Deploy Image') {
steps{
script {
docker.withRegistry( 'https://docker.fet.at/', '3e336704-7d58-4dcb-88b6-1ef7b5392576') {
app.push("1.$BUILD_NUMBER")
app.push('latest')
}
}
}
}
}
}

View File

@@ -1 +0,0 @@
docker build -t fet2020django .

View File

@@ -1,102 +0,0 @@
version: "2"
services:
mysql:
image: mariadb:10.7
container_name: test_mysql
networks:
- testfet
environment:
MYSQL_DATABASE: fet2020db
MYSQL_USER: user
MYSQL_PASSWORD: hgu
MYSQL_COLLATION: utf8_general_ci
MYSQL_CHARSET: utf8
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
#- mysql-volume:/var/lib/mysql
- /srv/initdb/mysql:/docker-entrypoint-initdb.d/
healthcheck:
test: "mysqladmin ping -h localhost && echo 'show tables;' | mysql 'fet2020db' >/dev/null "
timeout: 20s
retries: 20
etherpadsql:
image: mariadb:10.7
container_name: test_mysql_etherpad
networks:
- testfet
environment:
MYSQL_DATABASE: etherpaddb
MYSQL_USER: user
MYSQL_PASSWORD: "hgu"
MYSQL_COLLATION: utf8_general_ci
MYSQL_CHARSET: utf8
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
healthcheck:
test: "mysqladmin ping -h localhost && echo 'show tables;' | mysql --port 3306 --protocol tcp 'etherpaddb' > /dev/null"
timeout: 20s
retries: 20
volumes:
#- ep-mysql-volume:/var/lib/mysql
- /srv/initdb/etherpad:/docker-entrypoint-initdb.d/
etherpad:
image: etherpad/etherpad:1.8.17
container_name: test_etherpad
networks:
- testfet
environment:
DB_TYPE: mysql
DB_HOST: etherpadsql
DB_PORT: 3306
DB_NAME: etherpaddb
DB_USER: root
DB_PASS: ""
DB_CHARSET: utf8
TRUST_PROXY: "true"
REQUIRE_SESSION: "true"
depends_on:
etherpadsql:
condition: "service_healthy"
volumes:
- /srv/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt
restart: unless-stopped
# - ./deployment/mysql.cnf:/etc/mysql/conf.d
healthcheck:
test: "curl --fail localhost:9001 >/dev/null "
timeout: 10s
interval: 15s
retries: 30
fet2020:
image: docker.fet.at/fet2020django
container_name: test_fet2020
networks:
- testfet
environment:
HOST_NAME: "test.fet.at"
DEBUG: "False"
SECRET_KEY: "sadfreigjopi4qgjpjrp"
MYSQL_USER: "user"
MYSQL_PASSWORD: "hgu"
ETHERPAD_GROUP: "g.snlbqn7S6ksRbom3"
depends_on:
mysql:
condition: service_healthy
etherpad:
condition: service_healthy
ports:
- "8005:8080"
healthcheck:
test: "python3 manage.py check --database default"
timeout: 20s
retries: 20
volumes:
- /srv/APIKEY.txt:/app/etherpad/APIKEY.txt
- /srv/files:/app/files
restart: unless-stopped
volumes:
ep-mysql-volume:
driver: local
mysql-volume:
driver: local
networks:
testfet:
name: testfet

View File

@@ -1,6 +0,0 @@
#!/bin/sh
pip install -r requirements.txt
python3 manage.py makemigrations blackboard core gallery members posts tasks
python3 manage.py makemigrations intern
python3 manage.py migrate

View File

@@ -1,11 +0,0 @@
[uwsgi]
#uid
#gid
master = true
processes = 3
#chown-socket =www-data:www-data
module = fet2020.wsgi:application
pidfile=/tmp/project-master.pid
enable-threads = true
venv=/opt/venv
socket=/tmp/app.sock

View File

@@ -1,22 +0,0 @@
== Install System from scratch ==
=== Install Docker ===
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

View File

@@ -1,7 +0,0 @@
#/bin/bash
export REGISTRY="docker.triton2.fet.at"
git clone https://git.fet.at/bofh/fet2020.git tmp/fet2020
# Build a development Image with Theia and all content
docker build -f Dockerfile.test -t $REGISTRY/fet2020django:latest .
docker push $REGISTRY/fet2020django
rm -rf ./tmp/fet2020

View File

@@ -1,19 +0,0 @@
docker stop fetdjango
docker container rm fetdjango
docker stop mariadb
docker container rm mariadb
docker build -t fet2020django .
docker network create fet-net
docker run --name fetdjango --network fet-net -d -p 8080:8080 \
-v /srv/deploy_1/app/fet2020:/app fet2020django
docker run --name mariadb \
--network fet-net -d -p 3306:3306 \
-v mariadb2:/var/lib/mysql \
# -e SKIP_INNODB=yes \
-e MYSQL_DATABASE=wordpressdb \
-e MYSQL_USER=wordpressuser \
-e MYSQL_PASSWORD=hguyFt6S95dgfR4ryb \
jbergstroem/mariadb-alpine
docker exec fetdjango ./initdb

View File

@@ -1,11 +0,0 @@
docker stop mysql
docker container rm mysql
docker volume rm mariadb2
docker run -d --name mysql -p 3308:3306 \
-v mariadb2:/var/lib/mysql \
-e SKIP_INNODB=no \
-e MYSQL_DATABASE=fet2020db \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=hgu \
-e MYSQL_ROOT_PASSWORD=hgu \
jbergstroem/mariadb-alpine