Skip to content

Commit

Permalink
fix: Upgrade issues
Browse files Browse the repository at this point in the history
  • Loading branch information
benscobie committed Nov 29, 2024
1 parent fd4cc66 commit 2ac7dfb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN <<EOF cat >> ./ui/.env
NEXT_PUBLIC_BASE_PATH=/__PATH_PREFIX__
EOF

RUN sed -i "s,basePath: '',basePath: '/__PATH_PREFIX__',g" ./ui/next.config.js
RUN sed -i "s,basePath: '',basePath: '/__PATH_PREFIX__',g" ./ui/ui/next.config.js

RUN cd ui && yarn turbo build --filter=@maintainerr/ui
RUN cd server && yarn turbo build --filter=@maintainerr/server
Expand All @@ -43,10 +43,14 @@ WORKDIR /opt/app
COPY --from=builder --chmod=777 --chown=node:node /app/ui/ui/.next/standalone ./ui
COPY --from=builder --chmod=777 --chown=node:node /app/ui/ui/.next/static ./ui/ui/.next/static
COPY --from=builder --chmod=777 --chown=node:node /app/ui/ui/public ./ui/ui/public
# TODO Resolve permission denied with user directive on a few files in ui/ui/public?

# Copy standalone server
COPY --from=builder --chmod=777 --chown=node:node /app/server ./server

COPY docker/supervisord.conf /etc/supervisord.conf
COPY --chmod=777 docker/start.sh /opt/app/start.sh

# Create required directories
RUN mkdir -pm 777 /opt/data/logs && \
chown -R node:node /opt/data
Expand All @@ -58,10 +62,6 @@ RUN chmod 777 /opt/app/start.sh && \

RUN apk --update --no-cache add curl supervisor

COPY --from=pruner /app/supervisord.conf /etc/supervisord.conf
# Is chmod required here?
COPY --from=pruner --chmod=777 /app/docker/start.sh /opt/app/start.sh

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

Expand Down
7 changes: 6 additions & 1 deletion ui/src/components/Common/MediaCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,12 @@ const MediaCard: React.FC<IMediaCard> = ({
leaveTo="opacity-0"
>
<div className="absolute inset-0 z-40 flex items-center justify-center rounded-xl bg-zinc-800 bg-opacity-75 text-zinc-200">
<Spinner className="h-10 w-10" />
<CachedImage
priority
src={Spinner}
className="h-10 w-10"
alt=""
/>
</div>
</Transition>

Expand Down
7 changes: 4 additions & 3 deletions ui/src/components/Rules/Rule/RuleCreator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ const calculateRuleAmountArr = (ruleAmount: [number, number[]]) => {
}

const RuleCreator = (props: iRuleCreator) => {
const initialSections = props.editData
? props.editData.rules[props.editData.rules.length - 1].section! + 1
: undefined
const initialSections =
props.editData && props.editData.rules.length > 0
? props.editData.rules[props.editData.rules.length - 1].section! + 1
: undefined
const initialRuleAmount: [number, number[]] = initialSections
? calculateRuleAmount(props.editData, initialSections)
: [1, [1]]
Expand Down

0 comments on commit 2ac7dfb

Please sign in to comment.