Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
hzrd149 committed Dec 1, 2024
1 parent c3c3796 commit 217c62a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
38 changes: 28 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
FROM node:20 as builder
# syntax=docker/dockerfile:1
FROM node:20 AS base

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app

# Copy package files and install dependencies
COPY ./nostrudel/package*.json ./
COPY ./nostrudel/yarn.lock ./
RUN yarn install --frozen-lockfile --production=false
COPY ./nostrudel/package*.json .
COPY ./nostrudel/pnpm-lock.yaml .

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile

# set version env
ARG COMMIT_HASH=""
ARG APP_VERSION="Start9-OS"
ENV VITE_COMMIT_HASH="$COMMIT_HASH"
ENV VITE_APP_VERSION="$APP_VERSION"

# Copy application files
COPY ./nostrudel .
COPY ./nostrudel/tsconfig.json .
COPY ./nostrudel/vite.config.ts .
COPY ./nostrudel/index.html .
COPY ./nostrudel/public ./public
COPY ./nostrudel/src ./src

# Build
ENV VITE_COMMIT_HASH=""
ENV VITE_APP_VERSION="Start9-OS"
RUN yarn build
# build
RUN pnpm build

FROM nginx:stable-alpine-slim

Expand All @@ -22,7 +40,7 @@ RUN apk update && \
rm -rf /var/cache/apk/*

EXPOSE 8080
COPY --from=builder /app/dist /usr/share/nginx/html
COPY --from=build /app/dist /usr/share/nginx/html

ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
RUN chmod a+x /usr/local/bin/docker_entrypoint.sh
2 changes: 1 addition & 1 deletion nostrudel
Submodule nostrudel updated 67 files
+5 −0 .changeset/strong-dolphins-happen.md
+5 −0 .changeset/twelve-plums-yell.md
+5 −5 package.json
+131 −131 pnpm-lock.yaml
+2 −0 src/app.tsx
+1 −1 src/classes/accounts/amber-account.ts
+1 −1 src/classes/accounts/nostr-connect-account.ts
+1 −1 src/classes/accounts/nsec-account.ts
+1 −1 src/classes/accounts/password-account.ts
+1 −1 src/classes/accounts/serial-port-account.ts
+7 −3 src/classes/notifications.ts
+3 −41 src/components/charts/event-kinds-pie-chart.tsx
+44 −0 src/components/charts/simple-pie-chart.tsx
+10 −1 src/components/debug-modal/pages/cache.tsx
+52 −0 src/components/dvm/dvm-feed-favorite-button.tsx
+136 −0 src/components/gif/gif-picker-modal.tsx
+35 −0 src/components/gif/insert-gif-button.tsx
+46 −0 src/components/gif/single-zap-button.tsx
+2 −1 src/components/note/bookmark-event.tsx
+7 −15 src/components/post-modal/index.tsx
+30 −0 src/components/post-modal/insert-image-button.tsx
+2 −2 src/components/user/user-follow-button.tsx
+3 −18 src/helpers/app-settings.ts
+29 −0 src/helpers/magic-textarea.tsx
+1 −1 src/helpers/nostr/event.ts
+14 −18 src/helpers/nostr/lists.ts
+3 −1 src/helpers/parse.ts
+1 −2 src/hooks/use-app-settings.ts
+21 −0 src/hooks/use-favorite-feeds.ts
+5 −3 src/hooks/use-favorite-lists.ts
+0 −2 src/hooks/use-search-relays.ts
+24 −37 src/hooks/use-textarea-upload-file.ts
+9 −4 src/hooks/use-timeline-loader.ts
+1 −1 src/hooks/use-user-bookmarks-list.ts
+2 −1 src/hooks/use-user-channels-list.ts
+1 −1 src/hooks/use-user-communities-list.ts
+4 −3 src/providers/global/emoji-provider.tsx
+31 −23 src/providers/local/people-list-provider.tsx
+2 −3 src/queries/app-settings.ts
+0 −2 src/services/user-app-settings.ts
+1 −1 src/services/user-event-sync.ts
+14 −5 src/views/channels/components/send-message-form.tsx
+8 −4 src/views/discovery/dvm-feed/components/dvm-card.tsx
+69 −15 src/views/discovery/dvm-feed/feed.tsx
+20 −2 src/views/discovery/index.tsx
+8 −3 src/views/dms/components/send-message-form.tsx
+1 −1 src/views/emoji-packs/index.tsx
+9 −8 src/views/lists/browse.tsx
+1 −2 src/views/lists/components/list-card.tsx
+5 −6 src/views/lists/components/list-favorite-button.tsx
+2 −4 src/views/lists/list/index.tsx
+8 −0 src/views/other-stuff/apps.ts
+46 −0 src/views/relays/cache/components/citrine-relay-card.tsx
+51 −0 src/views/relays/cache/components/enable-with-delete.tsx
+27 −0 src/views/relays/cache/components/hosted-relay-card.tsx
+39 −0 src/views/relays/cache/components/internal-relay-card.tsx
+37 −0 src/views/relays/cache/components/memory-relay-card.tsx
+27 −0 src/views/relays/cache/components/no-relay-card.tsx
+52 −0 src/views/relays/cache/components/nostr-relay-tray-card.tsx
+31 −0 src/views/relays/cache/components/satellite-relay-card.tsx
+58 −0 src/views/relays/cache/components/wasm-relay-card.tsx
+17 −349 src/views/relays/cache/index.tsx
+35 −0 src/views/search/components/search-relay-picker.tsx
+5 −2 src/views/streams/stream/stream-chat/stream-chat-form.tsx
+8 −14 src/views/thread/components/reply-form.tsx
+136 −0 src/views/tools/nostrudel-users/index.tsx
+1 −3 src/views/user/components/header.tsx

0 comments on commit 217c62a

Please sign in to comment.