Skip to content

Commit b8e4240

Browse files
committed
fix docker file permissions
1 parent 6aa423b commit b8e4240

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/1-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ jobs:
6767
echo "No changes to commit - version already up to date"
6868
fi
6969
70-
git tag "$new_tag"
71-
git push origin "$new_tag"
70+
if git rev-parse "$new_tag" >/dev/null 2>&1; then
71+
echo "Tag $new_tag already exists. Skipping tag creation."
72+
else
73+
git tag "$new_tag"
74+
git push origin "$new_tag"
75+
fi
7276
7377
echo "new_tag=$new_tag" >> $GITHUB_OUTPUT
7478

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ FROM oven/bun:1-alpine
2222
# Set the working directory for the second stage
2323
WORKDIR /app
2424

25-
# Install 'serve' to serve the app on port 5522
26-
RUN bun add -g serve
27-
2825
# Copy the build directory from the first stage to the second stage
2926
COPY --from=build /app/dist /app
3027

3128
# Copy the injection script
3229
COPY inject-env.js /app/
3330

31+
# Install just serve for serving the built app
32+
RUN bun add serve
33+
3434
# Expose port 5522
3535
EXPOSE 5522
3636

@@ -42,10 +42,11 @@ ENV DUCK_UI_EXTERNAL_USER=""
4242
ENV DUCK_UI_EXTERNAL_PASS=""
4343
ENV DUCK_UI_EXTERNAL_DATABASE_NAME=""
4444

45+
# Create user and change ownership
4546
RUN addgroup -S duck-group -g 1001 && adduser -S duck-user -u 1001 -G duck-group
4647
RUN chown -R duck-user:duck-group /app
4748

4849
USER duck-user
4950

50-
# Run the injection script then serve
51-
CMD node inject-env.js && serve -s -l 5522
51+
# Run the injection script then serve using bunx
52+
CMD bun inject-env.js && bunx serve -s -l 5522

0 commit comments

Comments
 (0)