Skip to content

Commit

Permalink
Fix gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
loicknuchel committed Jun 20, 2024
1 parent c6d718b commit 9929ba9
Show file tree
Hide file tree
Showing 25 changed files with 9,804 additions and 263 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.4+sha256.30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9
version: 9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74

- name: Install Dependencies
env: # needs env for `mix ecto.setup`
PHX_HOST: localhost
PORT: 4000
FILE_STORAGE_ADAPTER: local
run: pnpm run setup
run: npm run setup

- name: Build docker image
run: docker build -t azimutt .
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.4+sha256.30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9
version: 9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74

- name: Install Dependencies
env: # needs env for `mix ecto.setup`
PHX_HOST: localhost
PORT: 4000
FILE_STORAGE_ADAPTER: local
run: pnpm run setup
run: npm run setup

- name: Check build
run: npm run build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ COPY pnpm-lock.yaml .
COPY libs/ libs
COPY frontend/ frontend

RUN npm install -g pnpm@9.1.4
RUN npm install -g pnpm@9.4.0
RUN npm run build:docker

# Compile the release
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@tailwindcss/typography": "^0.5.13",
"@types/canvas-confetti": "^1.6.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.5",
"concurrently": "^8.2.2",
"elm-book": "^1.0.1",
"elm-coverage": "^0.4.1",
Expand Down
12 changes: 12 additions & 0 deletions gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ Small Node server to proxy database connections and enable browsers to access da

The other way is to use the [desktop app](../desktop) for this, keeping everything local and accessing local databases.


## Set Up

- copy `.env.example` to `.env` and adapt values
- run `pnpm install` to install dependencies
- start dev server with `pnpm start`


## Env vars

Loaded from `.env` file, with schema validation


## Backend API Development

There are a number of handy commands you can run to help with development.
Expand All @@ -28,11 +31,19 @@ There are a number of handy commands you can run to help with development.
| `pnpm run lint` | Run eslint |
| `pnpm run lint:fix` | Run eslint in fix mode |


## CI

Run tests on push/PR to `main` branch
Check `.github/workflows/CI.yml`


## Deploy

Digital Ocean uses the `package-lock.json` to deploy, to generate it use `npm i --package-lock-only`.
The `workspace:^` can't be used there...


## Publish

- update `package.json` and `src/version.ts` versions
Expand All @@ -42,6 +53,7 @@ Check `.github/workflows/CI.yml`

View it on [npm](https://www.npmjs.com/package/@azimutt/gateway).


## Dev

If you need to develop on multiple libs at the same time (ex: want to update a connector and try it through the CLI), depend on local libs but publish & revert before commit.
Expand Down
Loading

0 comments on commit 9929ba9

Please sign in to comment.