A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix: deployment pipeline for docker not working (#860)
Meier Lukas90ef982066b5
diff --git a/.github/workflows/deployment-docker-image.yml b/.github/workflows/deployment-docker-image.ymlindex 6121cd187..e38392eb7 100644--- a/.github/workflows/deployment-docker-image.yml+++ b/.github/workflows/deployment-docker-image.yml@@ -63,10 +63,6 @@ jobs:with:node-version: ${{ matrix.node-version }}cache: "pnpm"- - name: Install dependencies- run: pnpm install- - name: Build artifacts- run: pnpm build- name: Discord notificationif: ${{ github.events.inputs.send-notifications }}env:@@ -90,13 +86,11 @@ jobs:id: buildPushActionuses: docker/build-push-action@v6with:- platforms: linux/amd64,linux/arm64,linux/arm/v7+ platforms: linux/amd64 # we currently do't build for linux/arm64 as it's really slow and we'll move to a self hosted runner for that or use the official github runner, once it's availablecontext: .push: falsetags: ${{ steps.meta.outputs.tags }}labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=maxnetwork: hostenv:SKIP_ENV_VALIDATION: truediff --git a/Dockerfile b/Dockerfileindex f224dce30..845d978c0 100644--- a/Dockerfile+++ b/Dockerfile@@ -3,6 +3,7 @@ FROM node:20.16.0-alpine AS baseFROM base AS builderRUN apk add --no-cache libc6-compatRUN apk update+# Set working directoryWORKDIR /appCOPY . .@@ -35,6 +36,7 @@ RUN corepack enable pnpm && pnpm installCOPY --from=builder /app/next-out/json/ .COPY --from=builder /app/next-out/pnpm-lock.yaml ./pnpm-lock.yaml+RUN corepack enable pnpm && pnpm installRUN corepack enable pnpm && pnpm install sharp -w@@ -46,8 +48,9 @@ COPY --from=builder /app/migration-out/full/ .# Copy static data as it is not part of the buildCOPY static-data ./static-data-ARG SKIP_ENV_VALIDATION=true-RUN corepack enable pnpm && pnpm turbo run build+ARG SKIP_ENV_VALIDATION='true'+ARG DISABLE_REDIS_LOGS='true'+RUN corepack enable pnpm && pnpm buildFROM base AS runnerWORKDIR /app@@ -84,6 +87,6 @@ COPY --chown=nextjs:nodejs packages/redis/redis.conf /app/redis.confENV DB_URL='/appdata/db/db.sqlite'ENV DB_DIALECT='sqlite'ENV DB_DRIVER='better-sqlite3'-ENV AUTH_PROVIDERS=credentials+ENV AUTH_PROVIDERS='credentials'CMD ["sh", "run.sh"]diff --git a/apps/nextjs/next.config.mjs b/apps/nextjs/next.config.mjsindex 0cc05f786..6dcb85464 100644--- a/apps/nextjs/next.config.mjs+++ b/apps/nextjs/next.config.mjs@@ -9,11 +9,14 @@ const config = {/** We already do linting and typechecking as separate tasks in CI */eslint: { ignoreDuringBuilds: true },typescript: { ignoreBuildErrors: true },- webpack: (config) => {- config.module.rules.push({- test: /\.node$/,- loader: "node-loader",- });+ webpack: (config, { isServer }) => {+ if (isServer) {+ config.module.rules.push({+ test: /\.node$/,+ loader: "node-loader",+ });+ }+return config;},experimental: {diff --git a/development/docker-run.cmd b/development/docker-run.cmdindex 36d3c7510..4c734fd9d 100644--- a/development/docker-run.cmd+++ b/development/docker-run.cmd@@ -1 +1 @@-docker run -p 3000:3000 -p 3001:3001 homarr:latest\ No newline at end of file+docker run -p 3000:3000 -p 3001:3001 -e AUTH_SECRET='secrets' homarr:latest\ No newline at end of filediff --git a/packages/log/src/index.mjs b/packages/log/src/index.mjsindex 1ef0b09d2..030745eb6 100644--- a/packages/log/src/index.mjs+++ b/packages/log/src/index.mjs@@ -6,9 +6,16 @@ const logMessageFormat = format.printf(({ level, message, timestamp }) => {return `${timestamp} ${level}: ${message}`;});+const logTransports = [new transports.Console()];++// Only add the Redis transport if we are not in CI+if (!(Boolean(process.env.CI) || Boolean(process.env.DISABLE_REDIS_LOGS))) {+ logTransports.push(new RedisTransport());+}+const logger = winston.createLogger({format: format.combine(format.colorize(), format.timestamp(), logMessageFormat),- transports: [new transports.Console(), new RedisTransport()],+ transports: logTransports,});export { logger };diff --git a/packages/redis/src/lib/connection.ts b/packages/redis/src/lib/connection.tsindex f006daafe..af6c05fac 100644--- a/packages/redis/src/lib/connection.ts+++ b/packages/redis/src/lib/connection.ts@@ -4,4 +4,11 @@ import { Redis } from "ioredis";* Creates a new Redis connection* @returns redis client*/-export const createRedisConnection = () => new Redis();+export const createRedisConnection = () => {+ if (Boolean(process.env.CI) || Boolean(process.env.DISABLE_REDIS_LOGS)) {+ // Return null if we are in CI as we don't want to connect to Redis+ return null as unknown as Redis;+ }++ return new Redis();+};diff --git a/turbo.json b/turbo.jsonindex 9d7bd177c..9be4b2792 100644--- a/turbo.json+++ b/turbo.json@@ -25,6 +25,7 @@"AUTH_PROVIDERS","AUTH_SECRET","CI",+ "DISABLE_REDIS_LOGS","DB_URL","DB_HOST","DB_USER",