Skip to content

Commit f1bc61a

Browse files
fix: fix css not loading (#1217)
* fix: fix css not loading * chore: update public api endpoint for tasks * feat: update docker version for tasks * chore: update default env variables --------- Co-authored-by: Felix Evers <git@felixevers.de>
1 parent c234a51 commit f1bc61a

File tree

12 files changed

+52
-32
lines changed

12 files changed

+52
-32
lines changed

Dockerfile.tasks

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
1-
FROM node:20.18.1 as build
2-
ENV NEXT_TELEMETRY_DISABLED 1
1+
FROM node:22.15.1 AS build
2+
3+
ENV NEXT_TELEMETRY_DISABLED=1
34
ARG WS="@helpwave/tasks"
45

5-
# install pnpm
6-
RUN npm install --global pnpm@9
6+
RUN npm install -g pnpm@9
77

88
WORKDIR /web
99

10-
# copy all dependency declarations inside the container
11-
COPY package.json .
12-
COPY pnpm-lock.yaml .
13-
COPY pnpm-workspace.yaml .
10+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
1411
COPY tasks/package.json ./tasks/
1512
COPY api-services/package.json ./api-services/
1613

17-
# install dependencies
1814
RUN CI=1 pnpm install
1915

20-
# build tasks app
2116
COPY tasks ./tasks/
2217
COPY api-services ./api-services/
18+
2319
RUN pnpm --filter $WS run build
2420

25-
FROM node:20.18.1-alpine
21+
22+
FROM node:22.15.1-alpine
2623

2724
LABEL maintainer="tech@helpwave.de"
2825

29-
ENV NEXT_TELEMETRY_DISABLED 1
26+
ENV NEXT_TELEMETRY_DISABLED=1
27+
3028
WORKDIR /web
3129

32-
RUN addgroup --system --gid 1001 nodejs
33-
RUN adduser --system --uid 1001 nextjs
30+
RUN addgroup -g 1001 nodejs && \
31+
adduser -S -u 1001 -G nodejs nextjs
3432

35-
# copy transpiled app
3633
COPY --from=build --chown=nextjs:nodejs /web/tasks/build/standalone ./
3734
COPY --from=build --chown=nextjs:nodejs /web/tasks/public ./tasks/public
3835
COPY --from=build --chown=nextjs:nodejs /web/tasks/build/static ./tasks/build/static
3936

37+
USER nextjs
38+
4039
EXPOSE 80
41-
ENV PORT 80
42-
ENV HOSTNAME 0.0.0.0
40+
ENV PORT=80
41+
ENV HOSTNAME=0.0.0.0
42+
ENV NODE_ENV=production
43+
4344
CMD ["node", "tasks/server.js"]

api-services/config/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import { z } from 'zod'
2626

2727
const configSchema = z.object({
2828
NODE_ENV: z.literal('production').or(z.literal('development')).default('production'),
29-
NEXT_PUBLIC_API_URL: z.string().url().default('https://api.helpwave.de'),
29+
NEXT_PUBLIC_API_URL: z.string().url().default('https://services.helpwave.de'),
3030
NEXT_PUBLIC_OFFLINE_API: z.literal('true').or(z.literal('false')).optional(),
3131
NEXT_PUBLIC_REQUEST_LOGGING: z.literal('true').or(z.literal('false')).optional(),
32-
NEXT_PUBLIC_OAUTH_ISSUER_URL: z.string().url().default('https://auth.helpwave.de'),
32+
NEXT_PUBLIC_OAUTH_ISSUER_URL: z.string().url().default('https://id.helpwave.de'),
3333
NEXT_PUBLIC_OAUTH_REDIRECT_URI: z.string().url().default('https://tasks.helpwave.de/auth/callback'),
3434
NEXT_PUBLIC_OAUTH_CLIENT_ID: z.string().default('425f8b8d-c786-4ff7-b2bf-e52f505fb588'),
3535
NEXT_PUBLIC_OAUTH_SCOPES: z.string().default('openid,offline_access,email,nickname,name,organizations'),

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tasks/.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NEXT_PUBLIC_API_URL=https://staging.api.helpwave.de
1+
NEXT_PUBLIC_API_URL=https://services.helpwave.de
22
NEXT_PUBLIC_OFFLINE_API=false
33
NEXT_PUBLIC_OAUTH_REDIRECT_URI=http://localhost:3000/auth/callback
44
NEXT_PUBLIC_FAKE_TOKEN_ENABLE=true

tasks/.env.production

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NODE_ENV=production
2-
NEXT_PUBLIC_API_URL=https://staging.api.helpwave.de
3-
NEXT_PUBLIC_OAUTH_REDIRECT_URI=https://staging-tasks.helpwave.de/auth/callback
2+
NEXT_PUBLIC_API_URL=https://services.helpwave.de
3+
NEXT_PUBLIC_OAUTH_REDIRECT_URI=https://tasks.helpwave.de/auth/callback
44
NEXT_PUBLIC_FAKE_TOKEN_ENABLE=true
55
NEXT_PUBLIC_SHOW_STAGING_DISCLAIMER_MODAL=true

tasks/components/Header.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export type HeaderProps = {
2424
*/
2525
const Header = ({ title, leftSide = [], rightSide = [], withIcon = true }: HeaderProps) => {
2626
return (
27-
<div className="h-16 py-4 relative items-center justify-between border-b border-slate-900/10">
28-
<div className="gap-4 w-full justify-between mx-4">
29-
<div className="w-full relative items-center align-center">
27+
<div className="row h-16 py-4 relative items-center justify-between border-b border-slate-900/10">
28+
<div className="row gap-4 w-full justify-between mx-4">
29+
<div className="row w-full relative items-center align-center">
3030
{withIcon && (
31-
<div className="relative gap-2 align-center">
31+
<div className="row relative align-center">
3232
<Link href="/">
3333
<Helpwave size={52} />
3434
</Link>
@@ -42,7 +42,7 @@ const Header = ({ title, leftSide = [], rightSide = [], withIcon = true }: Heade
4242
</div>
4343
))}
4444
</div>
45-
<div className="w-full items-center justify-end">
45+
<div className="row w-full items-center justify-end">
4646
{rightSide?.filter(value => value !== undefined).map((value, index) => (
4747
<div key={'rightAction' + index} className="row items-center">
4848
{value}

tasks/components/UserMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const UserMenu = ({
5959
const settingsURL = `${config.oauth.issuerUrl}/ui/settings`
6060

6161
return (
62-
<div className="relative z-10">
62+
<div className="row relative z-10">
6363
<LanguageModal
6464
id="userMenu-LanguageModal"
6565
onDone={() => setLanguageModalOpen(false)}
@@ -69,7 +69,7 @@ export const UserMenu = ({
6969
/>
7070
<Menu<HTMLDivElement> alignment="_r" trigger={(onClick, ref) => (
7171
<div ref={ref} onClick={onClick}
72-
className="gap-2 relative items-center group cursor-pointer select-none">
72+
className="row relative items-center group cursor-pointer select-none">
7373
{/* TODO set this color in the css config */}
7474
<div className="text-sm font-semibold text-gray-700 group-hover:text-primary">{user.name}</div>
7575
<Avatar avatarUrl={user.avatarUrl} alt={user.email} size="small"/>

tasks/components/layout/PageWithHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const PageWithHeader = ({
3333
const userMenu = <UserMenu />
3434

3535
return (
36-
<div className="w-screen h-screen col">
36+
<div className="col w-screen h-screen">
3737
<Header
3838
title={title}
3939
withIcon={withIcon}

tasks/globals.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import 'tailwindcss';
2+
@import '@helpwave/hightide/globals.css';
3+
4+
@source "./node_modules/@helpwave/hightide";

tasks/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "next dev",
7+
"dev": "next dev --turbopack",
88
"build": "next build",
99
"start": "next start",
1010
"lint": "tsc --noEmit && eslint .",
@@ -17,6 +17,7 @@
1717
"@helpwave/api-services": "workspace:*",
1818
"@helpwave/hightide": "^0.0.8",
1919
"@radix-ui/react-checkbox": "1.1.3",
20+
"@tailwindcss/postcss": "^4.1.3",
2021
"@tanstack/react-query": "^4.36.1",
2122
"@tanstack/react-query-devtools": "^4.36.1",
2223
"@tanstack/react-table": "8.20.6",
@@ -36,6 +37,7 @@
3637
"rxjs": "7.8.1",
3738
"simplebar-core": "1.3.0",
3839
"simplebar-react": "3.3.0",
40+
"tailwindcss": "^4.1.3",
3941
"typescript": "5.7.2",
4042
"zod": "3.24.1"
4143
},

0 commit comments

Comments
 (0)