Skip to content

Commit

Permalink
Merge pull request #547 from homarr-labs/dev
Browse files Browse the repository at this point in the history
chore: merge to main
  • Loading branch information
manuel-rw committed May 24, 2024
2 parents 974b4cf + 9e199b7 commit 17f9309
Show file tree
Hide file tree
Showing 471 changed files with 42,843 additions and 6,267 deletions.
11 changes: 11 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version = 1

[[analyzers]]
name = "javascript"

[analyzers.meta]
plugins = ["react"]
environment = ["nodejs"]

[[transformers]]
name = "prettier"
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
.next
.git
dev
20 changes: 19 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@
# This file will be committed to version control, so make sure not to have any secrets in it.
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.

# The database URL is used to connect to your PlanetScale database.
# This is how you can use the sqlite driver:
DB_DRIVER='better-sqlite3'
DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'

# Those are the two ways to use the mysql2 driver:
# 1. Using the URL format:
# DB_DRIVER='mysql2'
# DB_URL='mysql://user:password@host:port/database'
# 2. Using the connection options format:
# DB_DRIVER='mysql2'
# DB_HOST='localhost'
# DB_PORT='3306'
# DB_USER='username'
# DB_PASSWORD='password'
# DB_NAME='name-of-database'

# @see https://next-auth.js.org/configuration/options#nextauth_url
AUTH_URL='http://localhost:3000'

# You can generate the secret via 'openssl rand -base64 32' on Unix
# @see https://next-auth.js.org/configuration/options#secret
AUTH_SECRET='supersecret'

TURBO_TELEMETRY_DISABLED=1

# Configure logging to use winston logger
NODE_OPTIONS='-r @homarr/log/override'
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

github: juliusmarminge
open_collective: homarr
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ body:
attributes:
label: Additional information
description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here.

13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<br/>
<div align="center">
<img src="https://homarr.dev/img/logo.png" height="80" alt="" />
<h3>Homarr</h3>
</div>

**Thank you for your contribution. Please ensure that your pull request meets the following pull request:**

- [ ] Builds without warnings or errors (``pnpm buid``, autofix with ``pnpm format:fix``)
- [ ] Pull request targets ``dev`` branch
- [ ] Commits follow the [conventional commits guideline](https://www.conventionalcommits.org/en/v1.0.0/)
- [ ] No shorthand variable names are used (eg. ``x``, ``y``, ``i`` or any abbrevation)

14 changes: 6 additions & 8 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"extends": ["config:recommended"],
"packageRules": [
{
"matchPackagePatterns": [
"^@homarr/"
],
"matchPackagePatterns": ["^@homarr/"],
"enabled": false
}
],
"updateInternalDeps": true,
"rangeStrategy": "bump",
"automerge": true
}
"automerge": false,
"baseBranches": ["dev"],
"dependencyDashboard": false
}
41 changes: 0 additions & 41 deletions .github/workflows/automatic-release.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build apps and migration script

on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

env:
FORCE_COLOR: 3

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Copy env
shell: bash
run: cp .env.example .env

- name: Build
run: pnpm build
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Code quality analysis

on:
pull_request:
Expand Down Expand Up @@ -55,3 +55,14 @@ jobs:

- name: Typecheck
run: turbo typecheck

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Test
run: pnpm test
89 changes: 89 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Docker image

on:
pull_request:
types:
- closed
branches:
- main
workflow_dispatch: {}

permissions:
contents: write
packages: write

env:
TURBO_TELEMETRY_DISABLED: 1

concurrency: production

jobs:
deploy:
name: Deploy docker image
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "Deployment of an image has been triggered"
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build artifacts
run: pnpm build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Bump version and push tag
id: githubTagAction
uses: anothrNick/github-tag-action@1.69.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DRY_RUN: true
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "Image has been tagged as ${{ steps.githubTagAction.outputs.new_tag }}"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=raw,value=${{ steps.githubTagAction.outputs.new_tag }}
- name: Build and push
id: buildPushAction
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/riscv64,linux/arm/v7,linux/arm/v6
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
network: host
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "Image built with ID ${{ steps.buildPushAction.outputs.imageid }}"
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
node_modules
.pnp
.pnp.js
.idea/

# testing
coverage
Expand All @@ -13,6 +14,9 @@ coverage
out/
next-env.d.ts

# nest.js
apps/nestjs/dist

# nitro
.nitro/
.output/
Expand Down Expand Up @@ -44,4 +48,10 @@ yarn-error.log*
.turbo

# database
db.sqlite
db.sqlite

# logs
*.log

apps/tasks/tasks.cjs
apps/websocket/wssServer.cjs
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.2
20.13.1
Loading

0 comments on commit 17f9309

Please sign in to comment.