Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from runtipi:develop #66

Merged
merged 34 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a6bcb43
feat: display app id on an app store > app page
MontejoJorge Dec 1, 2023
84610b5
docs: update README.md [skip ci]
allcontributors[bot] Dec 7, 2023
53846df
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Dec 7, 2023
5a39766
chore(deps): install socket.io
nicotsx Dec 6, 2023
f0ae9a1
feat(worker): add socket manager
nicotsx Dec 6, 2023
16b40f2
refactor(dashboard): react to socket events and update app status
nicotsx Dec 6, 2023
1978abd
refactor(dashboard): use onError on server actions
nicotsx Dec 6, 2023
678e63f
refactor(app.queries): always execute app updates
nicotsx Dec 7, 2023
15376b0
chore(deps): bump actions/deploy-pages from 2 to 3
dependabot[bot] Dec 4, 2023
57ab304
chore(deps): bump actions/configure-pages from 3 to 4
dependabot[bot] Dec 4, 2023
90a9550
chore(deps-dev): bump eslint from 8.52.0 to 8.55.0
dependabot[bot] Dec 6, 2023
d1b99b0
Merge branch 'develop' into develop
nicotsx Dec 9, 2023
9410333
Merge branch 'MontejoJorge-develop' into develop
nicotsx Dec 9, 2023
6786857
chore(deps): add Sentry
nicotsx Dec 8, 2023
1d77580
feat(dashboard): configure sentry for client and server
nicotsx Dec 8, 2023
25bd9d1
feat(dashboard): add error monitoring opt-out feature
nicotsx Dec 8, 2023
c609670
feat(worker): capture errors with Sentry
nicotsx Dec 8, 2023
ae447be
ci(release): build images with sentry auth token env variable
nicotsx Dec 8, 2023
9d368cb
chore: update lock file
nicotsx Dec 9, 2023
a35dbe8
chore: remove sentry example pages
nicotsx Dec 9, 2023
98a64c7
test: remove failing test
nicotsx Dec 9, 2023
274394c
refactor(actions): secure app actions with ensure user util
nicotsx Dec 9, 2023
f7c33fd
chore(deps-dev): bump @types/pg from 8.10.7 to 8.10.9
dependabot[bot] Dec 6, 2023
aec254d
chore(deps): bump react-markdown from 9.0.0 to 9.0.1
dependabot[bot] Dec 6, 2023
c746043
chore(deps-dev): bump knip from 2.41.3 to 3.6.1
dependabot[bot] Dec 8, 2023
99efce7
chore(deps-dev): bump vite from 4.5.0 to 4.5.1
dependabot[bot] Dec 8, 2023
956ffbe
chore(deps-dev): bump @adobe/css-tools from 4.3.1 to 4.3.2
dependabot[bot] Dec 6, 2023
4d97e71
chore(deps-dev): bump tsx from 3.14.0 to 4.6.2
dependabot[bot] Dec 9, 2023
e69aea8
chore(deps): bump drizzle-orm from 0.28.6 to 0.29.1
dependabot[bot] Dec 9, 2023
e7878c0
fix(AppDetails): pass localDomain prop
nicotsx Dec 9, 2023
f4e8b38
chore: bump version to 2.3.0
nicotsx Dec 9, 2023
e6aab9c
ci(cli): create binary with node18
nicotsx Dec 9, 2023
2b39f73
fix(worker): don't fail update if app is not correctly stopping
nicotsx Dec 10, 2023
404e740
chore: disable sentry sourcemaps upload when building locally
nicotsx Dec 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,15 @@
"contributions": [
"code"
]
},
{
"login": "armandgillot",
"name": "Armand Gillot",
"avatar_url": "https://avatars.githubusercontent.com/u/79774155?v=4",
"profile": "http://www.armandgillot.fr",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
file: ./packages/worker/Dockerfile
platforms: linux/amd64
push: true
Expand All @@ -58,6 +60,8 @@ jobs:
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/worker:buildcache,mode=max

build-images:
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
runs-on: ubuntu-latest
needs: create-tag
steps:
Expand All @@ -81,6 +85,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository_owner }}/runtipi:${{ needs.create-tag.outputs.tagname }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
- name: Build and push images
uses: docker/build-push-action@v5
with:
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
context: .
file: ./packages/worker/Dockerfile
platforms: linux/amd64,linux/arm64
Expand Down Expand Up @@ -80,6 +82,8 @@ jobs:
- name: Build and push images
uses: docker/build-push-action@v5
with:
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
context: .
platforms: linux/amd64,linux/arm64
push: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
path: playwright-report/

- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
Expand All @@ -187,7 +187,7 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v3

teardown:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/runtipi:${{ needs.create-tag.outputs.tagname }},ghcr.io/${{ github.repository_owner }}/runtipi:latest
Expand Down Expand Up @@ -77,6 +79,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
file: ./packages/worker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ temp

./traefik/
/user-config/

# Sentry Config File
.sentryclirc
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports = {
singleQuote: true,
semi: true,
trailingComma: 'all',
printWidth: 200,
printWidth: 150,
};
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ COPY ./next.config.mjs ./next.config.mjs
COPY ./public ./public
COPY ./tests ./tests

# Sentry
COPY ./sentry.client.config.ts ./sentry.client.config.ts
COPY ./sentry.edge.config.ts ./sentry.edge.config.ts
COPY ./sentry.server.config.ts ./sentry.server.config.ts

ARG SENTRY_AUTH_TOKEN
ARG SENTRY_DISABLE_AUTO_UPLOAD

ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
ENV SENTRY_DISABLE_AUTO_UPLOAD=${SENTRY_DISABLE_AUTO_UPLOAD}

RUN npm run build

# APP
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ COPY ./tsconfig.json ./tsconfig.json
COPY ./next.config.mjs ./next.config.mjs
COPY ./public ./public

# Sentry
COPY ./sentry.client.config.ts ./sentry.client.config.ts
COPY ./sentry.edge.config.ts ./sentry.edge.config.ts
COPY ./sentry.server.config.ts ./sentry.server.config.ts

CMD ["npm", "run", "dev"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tipi — A personal homeserver for everyone

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-42-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-43-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![License](https://img.shields.io/github/license/runtipi/runtipi)](https://github.com/runtipi/runtipi/blob/master/LICENSE)
Expand Down Expand Up @@ -126,6 +126,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/0livier"><img src="https://avatars.githubusercontent.com/u/10607?v=4?s=100" width="100px;" alt="Olivier Garcia"/><br /><sub><b>Olivier Garcia</b></sub></a><br /><a href="https://github.com/runtipi/runtipi/commits?author=0livier" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qcoudeyr"><img src="https://avatars.githubusercontent.com/u/124463277?v=4?s=100" width="100px;" alt="qcoudeyr"/><br /><sub><b>qcoudeyr</b></sub></a><br /><a href="https://github.com/runtipi/runtipi/commits?author=qcoudeyr" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://www.armandgillot.fr"><img src="https://avatars.githubusercontent.com/u/79774155?v=4?s=100" width="100px;" alt="Armand Gillot"/><br /><sub><b>Armand Gillot</b></sub></a><br /><a href="https://github.com/runtipi/runtipi/commits?author=armandgillot" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ services:
context: .
dockerfile: ./packages/worker/Dockerfile.dev
container_name: tipi-worker
ports:
- 3935:3001
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/healthcheck']
interval: 5s
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ services:
context: .
dockerfile: ./packages/worker/Dockerfile
container_name: tipi-worker
ports:
- 3935:3001
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/healthcheck']
interval: 5s
Expand Down Expand Up @@ -93,6 +95,8 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
- SENTRY_DISABLE_AUTO_UPLOAD=true
container_name: tipi-dashboard
depends_on:
tipi-db:
Expand All @@ -104,7 +108,7 @@ services:
env_file:
- .env
environment:
NODE_ENV: development
NODE_ENV: production
networks:
- tipi_main_network
ports:
Expand Down
20 changes: 19 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { withSentryConfig } from '@sentry/nextjs';
/** @type {import('next').NextConfig} */
const nextConfig = {
swcMinify: true,
Expand Down Expand Up @@ -32,4 +33,21 @@ const nextConfig = {
},
};

export default nextConfig;
export default withSentryConfig(
nextConfig,
{
// https://github.com/getsentry/sentry-webpack-plugin#options
silent: false,
org: 'runtipi',
project: 'runtipi-dashboard',
dryRun: process.env.SENTRY_DISABLE_AUTO_UPLOAD === 'true',
},
{
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
widenClientFileUpload: true,
transpileClientSDK: false,
tunnelRoute: '/errors',
hideSourceMaps: false,
disableLogger: true,
},
);
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"name": "runtipi",
"version": "2.2.1",
"version": "2.3.0",
"description": "A homeserver for everyone",
"scripts": {
"knip": "knip",
"prepare": "mkdir -p state && echo \"{}\" > state/system-info.json && echo \"random-seed\" > state/seed",
"test": "dotenv -e .env.test -- jest --colors",
"test:e2e": "NODE_ENV=test dotenv -e .env -e .env.e2e -- playwright test",
"test:e2e:ui": "NODE_ENV=test dotenv -e .env -e .env.e2e -- playwright test --ui",
"test:client": "jest --colors --selectProjects client --",
"test:server": "jest --colors --selectProjects server --",
"test:vite": "dotenv -e .env.test -- vitest run --coverage",
"dev": "next dev",
"dev": "DEBUG=socket.io:client* next dev",
"dev:watcher": "pnpm -r --filter cli dev",
"db:migrate": "NODE_ENV=development dotenv -e .env.local -- tsx ./src/server/run-migrations-dev.ts",
"lint": "next lint",
Expand All @@ -20,8 +19,8 @@
"start": "NODE_ENV=production node server.js",
"start:dev-container": "./.devcontainer/filewatcher.sh && npm run start:dev",
"start:rc": "docker compose -f docker-compose.rc.yml --env-file .env up --build",
"start:dev": "npm run prepare && docker compose -f docker-compose.dev.yml up --build",
"start:prod": "npm run prepare && docker compose --env-file ./.env -f docker-compose.prod.yml up --build",
"start:dev": "docker compose -f docker-compose.dev.yml up --build",
"start:prod": "docker compose --env-file ./.env -f docker-compose.prod.yml up --build",
"start:pg": "docker run --name test-db -p 5433:5432 -d --rm -e POSTGRES_PASSWORD=postgres postgres:14",
"version": "echo $npm_package_version",
"release:rc": "./scripts/deploy/release-rc.sh",
Expand All @@ -44,13 +43,14 @@
"@radix-ui/react-tabs": "^1.0.4",
"@runtipi/postgres-migrations": "^5.3.0",
"@runtipi/shared": "workspace:^",
"@sentry/nextjs": "^7.86.0",
"@tabler/core": "1.0.0-beta20",
"@tabler/icons-react": "^2.42.0",
"argon2": "^0.31.2",
"bullmq": "^4.13.0",
"clsx": "^2.0.0",
"connect-redis": "^7.1.0",
"drizzle-orm": "^0.28.6",
"drizzle-orm": "^0.29.1",
"fs-extra": "^11.1.1",
"geist": "^1.2.0",
"let-it-go": "^1.0.0",
Expand All @@ -65,7 +65,7 @@
"react-dom": "18.2.0",
"react-hook-form": "^7.48.2",
"react-hot-toast": "^2.4.1",
"react-markdown": "^9.0.0",
"react-markdown": "^9.0.1",
"react-select": "^5.8.0",
"react-tooltip": "^5.25.0",
"redaxios": "^0.5.1",
Expand All @@ -76,6 +76,7 @@
"sass": "^1.69.5",
"semver": "^7.5.4",
"sharp": "0.32.6",
"socket.io-client": "^4.7.2",
"swr": "^2.2.4",
"tslib": "^2.6.2",
"uuid": "^9.0.1",
Expand All @@ -98,7 +99,7 @@
"@types/jest": "^29.5.11",
"@types/lodash.merge": "^4.6.8",
"@types/node": "20.8.10",
"@types/pg": "^8.10.7",
"@types/pg": "^8.10.9",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.14",
"@types/semver": "^7.5.4",
Expand All @@ -109,7 +110,7 @@
"@vitejs/plugin-react": "^4.1.1",
"@vitest/coverage-v8": "^0.34.6",
"dotenv-cli": "^7.3.0",
"eslint": "8.52.0",
"eslint": "8.55.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-next": "14.0.3",
Expand All @@ -124,14 +125,14 @@
"eslint-plugin-testing-library": "^6.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"knip": "^2.41.3",
"knip": "^3.6.1",
"memfs": "^4.6.0",
"msw": "^1.3.2",
"next-router-mock": "^0.9.10",
"prettier": "^3.0.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsx": "^3.14.0",
"tsx": "^4.6.2",
"typescript": "5.2.2",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/assets/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ services:
container_name: tipi-worker
image: ghcr.io/runtipi/worker:${TIPI_VERSION}
restart: unless-stopped
ports:
- 3935:3001
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/healthcheck']
interval: 5s
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"test": "dotenv -e .env.test vitest -- --coverage --watch=false --passWithNoTests",
"test:watch": "dotenv -e .env.test vitest",
"package": "npm run build && pkg package.json && chmod +x dist/bin/cli-x64 && chmod +x dist/bin/cli-arm64",
"package:m1": "npm run build && pkg package.json -t node20-darwin-arm64",
"package:m1": "npm run build && pkg package.json -t node18-darwin-arm64",
"set-version": "node -e \"require('fs').writeFileSync('assets/VERSION', process.argv[1])\"",
"build": "node build.js",
"build:meta": "esbuild ./src/index.ts --bundle --platform=node --target=node20 --outfile=dist/index.js --metafile=meta.json --analyze",
"build:meta": "esbuild ./src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.js --metafile=meta.json --analyze",
"dev": "dotenv -e ../../.env nodemon",
"lint": "eslint . --ext .ts",
"tsc": "tsc --noEmit",
Expand All @@ -20,8 +20,8 @@
"pkg": {
"assets": "assets/**/*",
"targets": [
"node20-linux-x64",
"node20-linux-arm64"
"node18-linux-x64",
"node18-linux-arm64"
],
"outputPath": "dist/bin"
},
Expand All @@ -35,11 +35,11 @@
"dotenv-cli": "^7.3.0",
"esbuild": "^0.19.4",
"eslint-config-prettier": "^9.0.0",
"knip": "^2.41.3",
"knip": "^3.6.1",
"memfs": "^4.6.0",
"nodemon": "^3.0.1",
"pkg": "^5.8.1",
"vite": "^4.5.0",
"vite": "^4.5.1",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6"
},
Expand Down
Loading