Skip to content

Commit

Permalink
1.7.1: Backup and responsive fixes (#83)
Browse files Browse the repository at this point in the history
* Fix backup save directory

* Fix eslint format settings

* Switch to pnpm

* Add pnpm action

* Specify cache-dependency-paths

* Switch to eslint action fork

* Specify eslint-command

* Bump eslint action fork version

* Use npx for eslint action

* Bump eslint action fork version

* Edit pnpm settings

* Remove extra working directory

* Remove extra working directory

* Move run_install to pnpm action setup

* Install pnpm recursively

* Bump eslint action fork version

* Test lint failure

* Fix eslint error

* Add support for arm64

* Use docker build+push action

* Quote docker tags

* Format tags differently

* Add spaces to tag variable

* Build for both platforms

* Fix csv imports

* Switch to use Drone instead of Actions for builds

* Add platforms for multi-arch build

* Sign pipeline

* Add cache_from setting

* Make users page responsive

* Fix 2fa verification middleware

* Remove unnecessary scrollbars

* Sign drone file

* Add .tags to .gitignore
  • Loading branch information
JackBailey authored Aug 18, 2023
1 parent e5f87ab commit d8603a0
Show file tree
Hide file tree
Showing 26 changed files with 4,795 additions and 9,084 deletions.
20 changes: 18 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: pipeline
type: docker
name: Build and Publish Image (Production)
Expand All @@ -19,14 +20,19 @@ steps:
- echo -n "beta,latest,$SEMVER_MAJOR.$SEMVER_MINOR.$SEMVER_PATCH,$SEMVER_MAJOR.$SEMVER_MINOR,$SEMVER_MAJOR" > .tags

- name: docker
image: plugins/docker
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
repo: jackbailey/lynx
dockerfile: Dockerfile
platforms:
- linux/arm64
- linux/amd64
cache_from: "jackbailey/lynx:beta"

---

Expand All @@ -51,11 +57,21 @@ steps:
- echo -n "beta,$DRONE_BRANCH-beta" > .tags

- name: docker
image: plugins/docker
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
repo: jackbailey/lynx
dockerfile: Dockerfile
platforms:
- linux/arm64
- linux/amd64
cache_from: "jackbailey/lynx:beta"
---
kind: signature
hmac: 9e22479e26d7f7d8a042ee89e1d3a6d41d7082492b562b9f5d0c9162cc4fe688

...
19 changes: 11 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile]
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g yarn
- run: yarn install
working-directory: src
- name: Lint Backend
uses: sibiraj-s/action-eslint@v3
uses: jackbailey/action-eslint@6494c60dd93dbb092144ca58dbf0ca14e85e4574
with:
token: ${{ secrets.GITHUB_TOKEN }} # optional
working-directory: src
extensions: 'js'
annotations: true
- run: yarn install
working-directory: frontend
use-npx: true
- name: Lint Frontend
uses: sibiraj-s/action-eslint@v3
uses: jackbailey/action-eslint@6494c60dd93dbb092144ca58dbf0ca14e85e4574
with:
token: ${{ secrets.GITHUB_TOKEN }} # optional
working-directory: frontend
extensions: 'js,vue'
annotations: true
annotations: true
use-npx: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dist-ssr
*.sw?

.env
.tags
/db
/tmp
/dev
Expand Down
10 changes: 5 additions & 5 deletions .tokeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
yarn.lock
package.json
.github
README.md
LICENSE
pnpm-lock.yaml
package.json
.github
README.md
LICENSE
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@
],
"editor.tabSize": 4,
"editor.insertSpaces": true,
"[vue-html]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"eslint.format.enable": true
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [1.7.1] - 2023-08-12

- Switch to pnpm
- Bug fixes:
- Fix backup solution to they're saved to /app/backups not /app/src/backups (Introduced in 1.7.0)
- Importing internal error when importing CSVs from refactor implementing ESLint.
- Fix 2fa verification middleware
- Remove unnecessary scrollbars
- Make users page responsive

## [1.7.0] - 2023-08-10

- Add user-management page
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM node:18 AS BUILD_IMAGE

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app

# Copy required files for packages

COPY ["./frontend/package.json","./frontend/yarn.lock","/app/frontend/"]
COPY ["./frontend/","/app/frontend/"]

COPY ["./src/package.json","./src/yarn.lock", "/app/src/"]
COPY ["./src/package.json","./src/pnpm-lock.yaml", "/app/src/"]

COPY ["VERSION", "./"]

# Install dependencies for backend

WORKDIR /app/src

RUN yarn
RUN pnpm install --frozen-lockfile --recursive

COPY src .
COPY src src

# Install dependencies for frontend and build it

WORKDIR /app/frontend
RUN NODE_ENV=production
COPY frontend .
RUN yarn
RUN yarn build
RUN pnpm build

FROM gcr.io/distroless/nodejs18-debian11

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.0
1.7.1
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
volumes:
- ./db:/data/db
ports:
- 27017:27017
- 27018:27017

lynx:
image: jackbailey/lynx
Expand Down
Loading

0 comments on commit d8603a0

Please sign in to comment.