Change frontend build process to bring in correct backend host and port variables
All checks were successful
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Successful in 12s
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Successful in 2m22s
Podman Rootless Demo / deploy-prod (push) Successful in 35s
All checks were successful
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Successful in 12s
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Successful in 2m22s
Podman Rootless Demo / deploy-prod (push) Successful in 35s
This commit is contained in:
parent
f9e0a790e5
commit
2feec4ea98
2 changed files with 15 additions and 6 deletions
|
|
@ -128,8 +128,8 @@ jobs:
|
|||
|
||||
test-frontend:
|
||||
runs-on: [ci]
|
||||
if: false
|
||||
needs: test-backend
|
||||
# if: false
|
||||
# needs: test-backend
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
|
@ -176,9 +176,9 @@ jobs:
|
|||
|
||||
build-frontend:
|
||||
runs-on: [ci]
|
||||
if: false
|
||||
needs: [test-backend, test-frontend]
|
||||
# needs: [test-frontend]
|
||||
# if: false
|
||||
# needs: [test-backend, test-frontend]
|
||||
needs: [test-frontend]
|
||||
|
||||
env:
|
||||
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
|
||||
|
|
@ -200,6 +200,8 @@ jobs:
|
|||
- name: Build frontend container image
|
||||
run: |
|
||||
podman --remote build --no-cache \
|
||||
--build-arg NEXT_PUBLIC_API_HOST=${{ secrets.PROD_BACKEND_HOST }} \
|
||||
--build-arg NEXT_PUBLIC_API_PORT=${{ secrets.PROD_BACKEND_PORT }} \
|
||||
-f frontend/Dockerfile \
|
||||
-t "$FRONTEND_IMAGE:${{ github.sha }}" \
|
||||
-t "$FRONTEND_IMAGE:latest" \
|
||||
|
|
@ -212,7 +214,7 @@ jobs:
|
|||
|
||||
deploy-prod:
|
||||
runs-on: [prod]
|
||||
# needs: [build-frontend]
|
||||
needs: [build-frontend]
|
||||
# needs: [build-backend, build-frontend]
|
||||
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,13 @@ COPY . .
|
|||
|
||||
# disable telemetry; let Next control NODE_ENV during build
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# Build-time environment variables for Next.js public config
|
||||
ARG NEXT_PUBLIC_API_HOST=127.0.0.1
|
||||
ARG NEXT_PUBLIC_API_PORT=3001
|
||||
ENV NEXT_PUBLIC_API_HOST=${NEXT_PUBLIC_API_HOST}
|
||||
ENV NEXT_PUBLIC_API_PORT=${NEXT_PUBLIC_API_PORT}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# ---------- runner (standalone) ----------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue