diff --git a/.gitignore b/.gitignore index 4d8d1bcfe21832a90ce988c2da5cbd32f2d7f2a7..1a15c9b0ad247610f7f7bf5c317447ba8b5abaf4 100644 --- a/.gitignore +++ b/.gitignore @@ -76,4 +76,5 @@ ehthumbs_vista.db $RECYCLE.BIN/ # Windows shortcuts -*.lnk \ No newline at end of file +*.lnk +.vercel diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8461d99ead12fc0e6f9c03c4243c4cc3e463c290..2dbbabfcd2f36b2110853316e874cdc28e946445 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,82 +1,27 @@ -# This example is for testing Django with MySQL. -# -# The test CI/CD variables MYSQL_DB, MYSQL_USER and MYSQL_PASS can be set in the project settings at: -# Settings --> CI/CD --> Variables -# -# The Django settings in settings.py, used in tests, might look similar to: -# -# DATABASES = { -# 'default': { -# 'ENGINE': 'django.db.backends.mysql', -# 'NAME': os.environ.get('MYSQL_DATABASE'), -# 'USER': os.environ.get('MYSQL_USER'), -# 'PASSWORD': os.environ.get('MYSQL_PASSWORD'), -# 'HOST': 'mysql', -# 'PORT': '3306', -# 'CONN_MAX_AGE':60, -# }, -# } -# -# It is possible to use '--settings' to specify a custom settings file on the command line below or use an environment -# variable to trigger an include on the bottom of your settings.py: -# if os.environ.get('DJANGO_CONFIG')=='test': -# from .settings_test import * -# -# It is also possible to hardcode the database name and credentials in the settings.py file and in the .gitlab-ci.yml file. -# -# The mysql service needs some variables too. See https://hub.docker.com/_/mysql for possible mysql env variables -# Note that when using a service in GitLab CI/CD that needs environment variables to run, only variables defined in -# .gitlab-ci.yml are passed to the service and variables defined in the GitLab UI are not. -# https://gitlab.com/gitlab-org/gitlab/-/issues/30178 - variables: - # DJANGO_CONFIG: "test" - MYSQL_DATABASE: $MYSQL_DB - MYSQL_ROOT_PASSWORD: $MYSQL_PASS - MYSQL_USER: $MYSQL_USER - MYSQL_PASSWORD: $MYSQL_PASS + VERCEL_TOKEN: "DCGOMqtTmsmIzNxIuiBcKs5T" + VERCEL_ORG_ID: "team_xB5Ku1LhaGJuU1Oo4Y7fUwmg" + VERCEL_PROJECT_ID: "prj_mq2yQ9M44zdvw4FkHCkTYaotvNI3" default: - image: ubuntu:20.04 - # - # Pick zero or more services to be used on all builds. - # Only needed when using a docker container to run your tests in. - # Check out: https://docs.gitlab.com/ee/ci/services/index.html - services: - - mysql:8.0 - # - # This folder is cached between builds - # http://docs.gitlab.com/ee/ci/yaml/README.html#cache - cache: - paths: - - ~/.cache/pip/ - before_script: - - apt -y update - - apt -y install apt-utils - - apt -y install net-tools python3.8 python3-pip mysql-client libmysqlclient-dev - - apt -y upgrade - - pip3 install -r requirements.txt - - -migrations: - stage: build - script: - - python3 manage.py makemigrations - # - python3 manage.py makemigrations myapp - - python3 manage.py migrate - - python3 manage.py check + image: node:16.16.0 - -django-tests: - stage: test +deploy_preview: + stage: deploy + except: + - main script: - # The MYSQL user only gets permissions for MYSQL_DB, so Django can't create a test database. - - echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql - # use python3 explicitly. see https://wiki.ubuntu.com/Python/3 - - python3 manage.py test + - npm install --global vercel + - vercel pull --yes --environment=preview --token=$VERCEL_TOKEN + - vercel build --token=$VERCEL_TOKEN + - vercel deploy --prebuilt --token=$VERCEL_TOKEN -deploy: +deploy_production: stage: deploy - script: echo "Define your deployment script!" - environment: production - + only: + - main + script: + - npm install --global vercel + - vercel pull --yes --environment=production --token=$VERCEL_TOKEN + - vercel build --prod --token=$VERCEL_TOKEN + - vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN \ No newline at end of file diff --git a/example_app/__pycache__/__init__.cpython-39.pyc b/example_app/__pycache__/__init__.cpython-39.pyc index 3166c0fb3f77655896194bf53e5eb2512faa7c25..69f15fcfa066f9ae47646ee0db9ff7463a4a13db 100644 Binary files a/example_app/__pycache__/__init__.cpython-39.pyc and b/example_app/__pycache__/__init__.cpython-39.pyc differ diff --git a/example_app/__pycache__/admin.cpython-39.pyc b/example_app/__pycache__/admin.cpython-39.pyc index 2ff1fa9a1234114eb3ab81bd672e8b31bbef9828..f26622e5e5f8844abf5de55a3f31a4266410581d 100644 Binary files a/example_app/__pycache__/admin.cpython-39.pyc and b/example_app/__pycache__/admin.cpython-39.pyc differ diff --git a/example_app/__pycache__/apps.cpython-39.pyc b/example_app/__pycache__/apps.cpython-39.pyc index b0f1ce8543d1c4c874264f7b9d1dda7afd3fd732..7f48f05d245f924b402c8269175af49a67b647f2 100644 Binary files a/example_app/__pycache__/apps.cpython-39.pyc and b/example_app/__pycache__/apps.cpython-39.pyc differ diff --git a/example_app/__pycache__/models.cpython-39.pyc b/example_app/__pycache__/models.cpython-39.pyc index a432343192c3c11de135d669b19b5ae20ee06937..d29ffd7dead9b2eaa801d8a6552043b2c095ee71 100644 Binary files a/example_app/__pycache__/models.cpython-39.pyc and b/example_app/__pycache__/models.cpython-39.pyc differ diff --git a/example_app/__pycache__/urls.cpython-39.pyc b/example_app/__pycache__/urls.cpython-39.pyc index b837eca6355c063840632b83e29d95b81b522a92..eac39ded70b171ffc0a12ad426edf285be3c68c4 100644 Binary files a/example_app/__pycache__/urls.cpython-39.pyc and b/example_app/__pycache__/urls.cpython-39.pyc differ diff --git a/example_app/__pycache__/views.cpython-39.pyc b/example_app/__pycache__/views.cpython-39.pyc index 3913ee52269699b71e235f24352e780db3999c50..9ab6ddf74afaaa04d6d423366c89afbba5b60901 100644 Binary files a/example_app/__pycache__/views.cpython-39.pyc and b/example_app/__pycache__/views.cpython-39.pyc differ diff --git a/example_app/migrations/__pycache__/0001_initial.cpython-39.pyc b/example_app/migrations/__pycache__/0001_initial.cpython-39.pyc index 4f691ce760626fdf638f008dbc025897b84fcc7b..05bbbea0e69dc09009d626afeb8cd0b956d4dae7 100644 Binary files a/example_app/migrations/__pycache__/0001_initial.cpython-39.pyc and b/example_app/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/example_app/migrations/__pycache__/__init__.cpython-39.pyc b/example_app/migrations/__pycache__/__init__.cpython-39.pyc index fcd33e788ff9a9a8fcefe0be84c9093824972e99..b6bac9a3b0f5e14032cbd0c5fb4ebbfdadacfe51 100644 Binary files a/example_app/migrations/__pycache__/__init__.cpython-39.pyc and b/example_app/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/landing_page/__pycache__/__init__.cpython-39.pyc b/landing_page/__pycache__/__init__.cpython-39.pyc index b9a85d8400d65c62443cba01fad7b7b77f7bcd69..0f26e13a1bdb8bb5f8d66167e655ddcc4f75693a 100644 Binary files a/landing_page/__pycache__/__init__.cpython-39.pyc and b/landing_page/__pycache__/__init__.cpython-39.pyc differ diff --git a/landing_page/__pycache__/admin.cpython-39.pyc b/landing_page/__pycache__/admin.cpython-39.pyc index f90d60d9a2b47121da36eb57c5ac2cc923cacd22..7355691e01d0161445e230432df79bf8fc795b58 100644 Binary files a/landing_page/__pycache__/admin.cpython-39.pyc and b/landing_page/__pycache__/admin.cpython-39.pyc differ diff --git a/landing_page/__pycache__/apps.cpython-39.pyc b/landing_page/__pycache__/apps.cpython-39.pyc index c89864da4cd26da0a5112da2b0172c5119cea67a..1af70d2799e21252d31b35d1ef32e4c20fb597a0 100644 Binary files a/landing_page/__pycache__/apps.cpython-39.pyc and b/landing_page/__pycache__/apps.cpython-39.pyc differ diff --git a/landing_page/__pycache__/models.cpython-39.pyc b/landing_page/__pycache__/models.cpython-39.pyc index 78683471591b2d65d39ab63b9df3a8760867a6fa..ca1a5e3b742bd57bbecae51a0e54cd03a31f346e 100644 Binary files a/landing_page/__pycache__/models.cpython-39.pyc and b/landing_page/__pycache__/models.cpython-39.pyc differ diff --git a/landing_page/migrations/__pycache__/__init__.cpython-39.pyc b/landing_page/migrations/__pycache__/__init__.cpython-39.pyc index 1fc6896b30c1964ee5e1934f9bc347428024022f..1f09119d8c7a5a93b19f04ae2da2bad4d69099b9 100644 Binary files a/landing_page/migrations/__pycache__/__init__.cpython-39.pyc and b/landing_page/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/project_a4_logistik/__pycache__/__init__.cpython-39.pyc b/project_a4_logistik/__pycache__/__init__.cpython-39.pyc index c8031203ebbada669ecbd5256fb12682ec8a020a..bff9843e623c8f91c90dadf862dcda961d680689 100644 Binary files a/project_a4_logistik/__pycache__/__init__.cpython-39.pyc and b/project_a4_logistik/__pycache__/__init__.cpython-39.pyc differ diff --git a/project_a4_logistik/__pycache__/settings.cpython-39.pyc b/project_a4_logistik/__pycache__/settings.cpython-39.pyc index 55fc98675cf97c3a8ae86f71e75b9ee535776a30..034138dfe19b5ef72282e4cdf89ee3807557d1aa 100644 Binary files a/project_a4_logistik/__pycache__/settings.cpython-39.pyc and b/project_a4_logistik/__pycache__/settings.cpython-39.pyc differ diff --git a/project_a4_logistik/__pycache__/urls.cpython-39.pyc b/project_a4_logistik/__pycache__/urls.cpython-39.pyc index 659f91692da6a6efb3cdde8ea6e177bd3de3dc91..304013ca3ab04d6ba27915e6c3717ed9888f9c36 100644 Binary files a/project_a4_logistik/__pycache__/urls.cpython-39.pyc and b/project_a4_logistik/__pycache__/urls.cpython-39.pyc differ diff --git a/project_a4_logistik/__pycache__/wsgi.cpython-39.pyc b/project_a4_logistik/__pycache__/wsgi.cpython-39.pyc index 54570cfa5a7a83f2bf9318601ae01cbc0c0ec11e..7f6a42cf4027d6fcf773a79bc86fd64c33fe46dd 100644 Binary files a/project_a4_logistik/__pycache__/wsgi.cpython-39.pyc and b/project_a4_logistik/__pycache__/wsgi.cpython-39.pyc differ