From c67e6a181beea4524414501bac948376468a9f7b Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 17 Jul 2023 12:27:24 +0200 Subject: [PATCH 01/21] Dockerfile --- .dockerignore | 1 + Dockerfile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a264d5c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Build stage +FROM node:lts-alpine as build-stage +WORKDIR /app +# Install before copying the rest, for caching purposes +COPY package.json yarn.lock .yarnrc.yml ./ +COPY .yarn/releases .yarn/releases +RUN yarn install +COPY . . +RUN yarn run build + +# Production stage +FROM nginx:stable-alpine as production-stage +COPY --from=build-stage /app/dist /usr/share/nginx/html +EXPOSE 80 +# Make Nginx run in foreground +RUN echo "daemon off;" >> /etc/nginx/nginx.conf +CMD nginx From 753fcfa7b8ac7df9a4559d6d175fa62cb22fee62 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 1 Dec 2023 14:01:01 +0100 Subject: [PATCH 02/21] Add Docker CI job --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a39dacb..56aac94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,3 +20,11 @@ jobs: node-version-file: .nvmrc - run: yarn install - run: yarn build + + docker: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/docker-setup-buildx@v3 + - run: docker build . From 574aa1ba143a2733cdda0c7e811cb0e0fc958df3 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 1 Dec 2023 14:03:00 +0100 Subject: [PATCH 03/21] Fix docker action name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56aac94..a6b6e1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,5 +26,5 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/docker-setup-buildx@v3 + - uses: docker/setup-buildx-action@v3 - run: docker build . From 688c1520012ac0bdd1b28c35729a6156571091a8 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 1 Dec 2023 14:29:21 +0100 Subject: [PATCH 04/21] Nginx conf, Docker info in Readme --- Dockerfile | 1 + README.md | 7 +++++++ nginx.conf | 10 ++++++++++ 3 files changed, 18 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index a264d5c..4d0b776 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN yarn run build # Production stage FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 # Make Nginx run in foreground RUN echo "daemon off;" >> /etc/nginx/nginx.conf diff --git a/README.md b/README.md index d302764..c7ce69d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ To use the test environment of Libris XL, modify `.env.local` or run: - `VITE_XLAPI_QA=1 yarn dev` +## Docker + +1. [Install Docker](https://www.docker.com/get-started/) +2. `docker build -t queerlit-gui .` +3. `docker run -p 8090:80 queerlit-gui` +4. Visit site at http://localhost:8090/ + ### Visual Studio Code settings ```json diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..30a26f2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + # index index.html index.htm; + try_files $uri $uri/ /index.html; + } +} From 0db3ccbe2680656030fe4cc863f68fc0ab616023 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 1 Dec 2023 17:22:39 +0100 Subject: [PATCH 05/21] Remove nginx conf comment --- nginx.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 30a26f2..36c6b61 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,7 +4,6 @@ server { location / { root /usr/share/nginx/html; - # index index.html index.htm; try_files $uri $uri/ /index.html; } } From b395d5407fd0f008b7417c0941de40889571e3d8 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 1 Dec 2023 17:24:20 +0100 Subject: [PATCH 06/21] Changelog about Docker --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14328e2..e634d87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,14 @@ As this project is a user-facing application, the places in the semantic version - `MAJOR` denotes changes that are expected to significantly disrupt the flow of a returning user with some experience of the application, _or_ that significantly affects the development workflow - `MINOR` denotes changes that may affect the user experience _or_ the development workflow -- `PATCH` denotes changes that are insignificant to the user experience or the develpment workflow +- `PATCH` denotes changes that are insignificant to the user experience or the development workflow ## [Unreleased] +### Added + +- Docker support + ## [2.2.7] (2023-11-29) ### Fixed From 173d81fa3fd03dcaa42f724e36458bddc70ca961 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 4 Dec 2023 11:11:35 +0100 Subject: [PATCH 07/21] Show year tooltip, tweak slider style, fix #157 --- CHANGELOG.md | 1 + src/search/YearFilter.vue | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e634d87..d810f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ As this project is a user-facing application, the places in the semantic version ### Added - Docker support +- Show year tooltip when dragging year filter slider handles ## [2.2.7] (2023-11-29) diff --git a/src/search/YearFilter.vue b/src/search/YearFilter.vue index 3d8b9a5..e3cc676 100644 --- a/src/search/YearFilter.vue +++ b/src/search/YearFilter.vue @@ -32,12 +32,14 @@ v-model="range" :min="min" :max="MAX" - :tooltips="false" + showTooltip="drag" :classes="{ horizontal: 'slider-horizontal h-1 mb-2', connect: 'slider-connect bg-current', origin: 'slider-origin transition-transform', - handle: 'slider-handle border border-current', + handle: + 'slider-handle border border-current focus:ring-text focus:ring-opacity-30', + tooltip: 'slider-tooltip bg-smoke-300 border-smoke-300 text-text', }" @change="emitChange" /> From 4d8d550c3880842fbb128876fa14cd0ac14958c0 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 4 Dec 2023 11:51:25 +0100 Subject: [PATCH 08/21] Center app on large screen, improve padding harmony --- CHANGELOG.md | 4 + index.html | 2 +- src/App.vue | 17 ++++- src/SiteFooter.vue | 2 +- src/search/FiltersBar.vue | 2 +- src/search/ResultItem.vue | 2 +- src/search/Results.vue | 150 ++++++++++++++++++------------------- src/search/WorkDetails.vue | 4 +- src/views/Term.vue | 2 +- tailwind.config.js | 1 + 10 files changed, 101 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d810f16..fb942e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ As this project is a user-facing application, the places in the semantic version - Docker support - Show year tooltip when dragging year filter slider handles +### Change + +- Set maximum app width and center on large screens + ## [2.2.7] (2023-11-29) ### Fixed diff --git a/index.html b/index.html index 5452925..3b5318c 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Queerlit -
+
diff --git a/src/App.vue b/src/App.vue index e237c37..94df85c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,16 @@