Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #70 from useaurora/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Renato Pozzi authored Jun 30, 2021
2 parents a243cad + 9d87b23 commit 9f73612
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules

RUN npm run build
RUN NEXT_PUBLIC_API_URL=APP_NEXT_PUBLIC_API_URL npm run build

# Production image, copy all the files and run next
FROM node:14-alpine AS runner
Expand All @@ -31,6 +31,7 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/entrypoint.sh ./entrypoint.sh

RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
Expand All @@ -42,4 +43,6 @@ EXPOSE 3000

RUN npx next telemetry disable

ENTRYPOINT ["/app/entrypoint.sh"]

CMD npm run start
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "3.7"
services:
ui:
image: ghcr.io/useaurora/aurora/aurora
build: .
ports:
- "3000:3000"
environment:
Expand Down
9 changes: 9 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

echo "Check that we have NEXT_PUBLIC_API_URL vars"
test -n "$NEXT_PUBLIC_API_URL"

find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_API_URL#$NEXT_PUBLIC_API_URL#g"

echo "Starting Nextjs"
exec "$@"
14 changes: 0 additions & 14 deletions vercel.sh

This file was deleted.

0 comments on commit 9f73612

Please sign in to comment.