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:
|
test-frontend:
|
||||||
runs-on: [ci]
|
runs-on: [ci]
|
||||||
if: false
|
# if: false
|
||||||
needs: test-backend
|
# needs: test-backend
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -176,9 +176,9 @@ jobs:
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
runs-on: [ci]
|
runs-on: [ci]
|
||||||
if: false
|
# if: false
|
||||||
needs: [test-backend, test-frontend]
|
# needs: [test-backend, test-frontend]
|
||||||
# needs: [test-frontend]
|
needs: [test-frontend]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
|
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
|
||||||
|
|
@ -200,6 +200,8 @@ jobs:
|
||||||
- name: Build frontend container image
|
- name: Build frontend container image
|
||||||
run: |
|
run: |
|
||||||
podman --remote build --no-cache \
|
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 \
|
-f frontend/Dockerfile \
|
||||||
-t "$FRONTEND_IMAGE:${{ github.sha }}" \
|
-t "$FRONTEND_IMAGE:${{ github.sha }}" \
|
||||||
-t "$FRONTEND_IMAGE:latest" \
|
-t "$FRONTEND_IMAGE:latest" \
|
||||||
|
|
@ -212,7 +214,7 @@ jobs:
|
||||||
|
|
||||||
deploy-prod:
|
deploy-prod:
|
||||||
runs-on: [prod]
|
runs-on: [prod]
|
||||||
# needs: [build-frontend]
|
needs: [build-frontend]
|
||||||
# needs: [build-backend, build-frontend]
|
# needs: [build-backend, build-frontend]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,13 @@ COPY . .
|
||||||
|
|
||||||
# disable telemetry; let Next control NODE_ENV during build
|
# disable telemetry; let Next control NODE_ENV during build
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
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
|
RUN npm run build
|
||||||
|
|
||||||
# ---------- runner (standalone) ----------
|
# ---------- runner (standalone) ----------
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue