From 2a390949423ec0583602fc81758b50742a1e8f3b Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 9 Apr 2024 22:57:21 +0200 Subject: [PATCH 1/4] fix: copy docker file --- .prod.env | 15 +++++++-------- backend/Dockerfile | 2 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.prod.env b/.prod.env index 188d743b..f5045050 100644 --- a/.prod.env +++ b/.prod.env @@ -1,4 +1,3 @@ -# Default values PUID=1000 PGID=1000 TZ=Europe/Brussels @@ -7,25 +6,25 @@ TZ=Europe/Brussels DATA_DIR="./data" BACKEND_DIR="./backend" FRONTEND_DIR="./frontend" -SSL_DIR="" +SSL_DIR="./data/nginx/ssl" # Postgress DB POSTGRES_IP=192.168.90.9 POSTGRES_PORT=5432 POSTGRES_DB=selab POSTGRES_USER=selab_user -POSTGRES_PASSWORD="" # Set to desired password +POSTGRES_PASSWORD="QGp2D59UrlfgRpNm6NQe67O41aVkNf" # Set to desired password # Redis REDIS_IP=192.168.90.10 REDIS_PORT=6379 # Django -DJANGO_SECRET_KEY="" # Set to a random string +DJANGO_SECRET_KEY="Z5ydXDNuPeRhXoI4we14rl3XAi70Aa" # Set to a random string DJANGO_DEBUG=False # Django debug mode -DJANGO_DOMAIN_NAME="" # Domain name for the Django server -DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server -DJANGO_CAS_PORT="" # Port for the CAS server +DJANGO_DOMAIN_NAME="sel2-7.ugent.be" # Domain name for the Django server +DJANGO_CAS_URL_PREFIX="auth" # URL prefix for the CAS server +DJANGO_CAS_PORT="443" # Port for the CAS server DJANGO_DB_ENGINE=django.db.backends.postgresql # Database engine configuration DJANGO_DB_NAME=${POSTGRES_DB} DJANGO_DB_USER=${POSTGRES_USER} @@ -33,4 +32,4 @@ DJANGO_DB_PASSWORD=${POSTGRES_PASSWORD} DJANGO_DB_HOST=${POSTGRES_IP} DJANGO_DB_PORT=${POSTGRES_PORT} DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration -DJANGO_REDIS_PORT=${REDIS_PORT} +DJANGO_REDIS_PORT=${REDIS_PORT} \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile index 996314c1..f95477dd 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,3 +7,5 @@ WORKDIR /code COPY pyproject.toml poetry.lock ./ RUN poetry install --only main + +COPY . ./ \ No newline at end of file From f3165daf1a012c3caf8817e4c3c760cf62d216ee Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 9 Apr 2024 23:14:51 +0200 Subject: [PATCH 2/4] fix: images --- .../components/courses/CourseDetailCard.vue | 2 +- .../components/courses/CourseGeneralCard.vue~ | 62 +++++++++++++++++++ frontend/src/vite-env.d.ts | 1 + 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/courses/CourseGeneralCard.vue~ diff --git a/frontend/src/components/courses/CourseDetailCard.vue b/frontend/src/components/courses/CourseDetailCard.vue index 910f9a1b..494ae601 100644 --- a/frontend/src/components/courses/CourseDetailCard.vue +++ b/frontend/src/components/courses/CourseDetailCard.vue @@ -16,7 +16,7 @@ const { t } = useI18n(); /* Default image thumbnails */ const images = Object.keys( import.meta.glob('@/assets/img/placeholders/*', { - eager: true, + eager: true, query: 'url' }), ); diff --git a/frontend/src/components/courses/CourseGeneralCard.vue~ b/frontend/src/components/courses/CourseGeneralCard.vue~ new file mode 100644 index 00000000..8243b985 --- /dev/null +++ b/frontend/src/components/courses/CourseGeneralCard.vue~ @@ -0,0 +1,62 @@ + + + + + diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index 710a84d5..24255500 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -1,3 +1,4 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference /// declare module 'js-cookie'; +declare module 'jsdom'; \ No newline at end of file From 7b6060eadb17d924d0b9e9bf41c3766bc68a2b50 Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 9 Apr 2024 23:18:41 +0200 Subject: [PATCH 3/4] chore: linting --- .prod.env | 15 ++++++++------- .../src/components/courses/CourseDetailCard.vue | 3 ++- frontend/src/vite-env.d.ts | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.prod.env b/.prod.env index f5045050..188d743b 100644 --- a/.prod.env +++ b/.prod.env @@ -1,3 +1,4 @@ +# Default values PUID=1000 PGID=1000 TZ=Europe/Brussels @@ -6,25 +7,25 @@ TZ=Europe/Brussels DATA_DIR="./data" BACKEND_DIR="./backend" FRONTEND_DIR="./frontend" -SSL_DIR="./data/nginx/ssl" +SSL_DIR="" # Postgress DB POSTGRES_IP=192.168.90.9 POSTGRES_PORT=5432 POSTGRES_DB=selab POSTGRES_USER=selab_user -POSTGRES_PASSWORD="QGp2D59UrlfgRpNm6NQe67O41aVkNf" # Set to desired password +POSTGRES_PASSWORD="" # Set to desired password # Redis REDIS_IP=192.168.90.10 REDIS_PORT=6379 # Django -DJANGO_SECRET_KEY="Z5ydXDNuPeRhXoI4we14rl3XAi70Aa" # Set to a random string +DJANGO_SECRET_KEY="" # Set to a random string DJANGO_DEBUG=False # Django debug mode -DJANGO_DOMAIN_NAME="sel2-7.ugent.be" # Domain name for the Django server -DJANGO_CAS_URL_PREFIX="auth" # URL prefix for the CAS server -DJANGO_CAS_PORT="443" # Port for the CAS server +DJANGO_DOMAIN_NAME="" # Domain name for the Django server +DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server +DJANGO_CAS_PORT="" # Port for the CAS server DJANGO_DB_ENGINE=django.db.backends.postgresql # Database engine configuration DJANGO_DB_NAME=${POSTGRES_DB} DJANGO_DB_USER=${POSTGRES_USER} @@ -32,4 +33,4 @@ DJANGO_DB_PASSWORD=${POSTGRES_PASSWORD} DJANGO_DB_HOST=${POSTGRES_IP} DJANGO_DB_PORT=${POSTGRES_PORT} DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration -DJANGO_REDIS_PORT=${REDIS_PORT} \ No newline at end of file +DJANGO_REDIS_PORT=${REDIS_PORT} diff --git a/frontend/src/components/courses/CourseDetailCard.vue b/frontend/src/components/courses/CourseDetailCard.vue index 494ae601..dc5689c9 100644 --- a/frontend/src/components/courses/CourseDetailCard.vue +++ b/frontend/src/components/courses/CourseDetailCard.vue @@ -16,7 +16,8 @@ const { t } = useI18n(); /* Default image thumbnails */ const images = Object.keys( import.meta.glob('@/assets/img/placeholders/*', { - eager: true, query: 'url' + eager: true, + query: 'url', }), ); diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index 24255500..2dfd5544 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -1,4 +1,4 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference /// declare module 'js-cookie'; -declare module 'jsdom'; \ No newline at end of file +declare module 'jsdom'; From 3438148125b910702dad030f06f5d3a1daafcfbc Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 9 Apr 2024 23:20:26 +0200 Subject: [PATCH 4/4] chore: cleanup --- .../components/courses/CourseGeneralCard.vue | 2 +- .../components/courses/CourseGeneralCard.vue~ | 62 ------------------- 2 files changed, 1 insertion(+), 63 deletions(-) delete mode 100644 frontend/src/components/courses/CourseGeneralCard.vue~ diff --git a/frontend/src/components/courses/CourseGeneralCard.vue b/frontend/src/components/courses/CourseGeneralCard.vue index 8243b985..aa3bf8f2 100644 --- a/frontend/src/components/courses/CourseGeneralCard.vue +++ b/frontend/src/components/courses/CourseGeneralCard.vue @@ -17,7 +17,7 @@ const { user } = storeToRefs(useAuthStore()); /* State */ const images = Object.keys( import.meta.glob('@/assets/img/faculties/*', { - eager: true, + eager: true, query: 'url' }), ); diff --git a/frontend/src/components/courses/CourseGeneralCard.vue~ b/frontend/src/components/courses/CourseGeneralCard.vue~ deleted file mode 100644 index 8243b985..00000000 --- a/frontend/src/components/courses/CourseGeneralCard.vue~ +++ /dev/null @@ -1,62 +0,0 @@ - - - - -