Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01fc955764 | |||
| 97e6b1d391 | |||
| dbf9ffc340 | |||
| 9428c0055e | |||
| d5dc959f56 |
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
NEXT_PUBLIC_CORE_API_URL=https://hexafit.hexdive.com
|
NEXT_PUBLIC_CORE_API_URL=https://vijayasport.hexdive.com
|
||||||
NEXT_PUBLIC_AUTH_API_URL=https://hexafit.hexdive.com
|
NEXT_PUBLIC_AUTH_API_URL=https://vijayasport.hexdive.com
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
name: CI/CD - Vijaya hexafitness web
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- production
|
||||||
|
- test
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
name: Build & Deploy
|
||||||
|
runs-on: linux
|
||||||
|
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'production'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
git clone \
|
||||||
|
--depth 1 \
|
||||||
|
--branch production \
|
||||||
|
https://oauth2:${{ secrets.VIJAYA }}@gitea.hexdive.com/Vijaya_Gym/Client_Fe.git \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg NEXT_PUBLIC_CORE_API_URL="${{ secrets.NEXT_PUBLIC_CORE_API_URL }}" \
|
||||||
|
-t hexafit-web:latest \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Stop & remove existing container
|
||||||
|
run: |
|
||||||
|
docker stop hexafit-web 2>/dev/null || true
|
||||||
|
docker rm hexafit-web 2>/dev/null || true
|
||||||
|
|
||||||
|
- name: Start container
|
||||||
|
run: |
|
||||||
|
docker run -d \
|
||||||
|
--name hexafit-web \
|
||||||
|
-p 127.0.0.1:5633:3000 \
|
||||||
|
--env-file /home/vijaya/web/.env \
|
||||||
|
--restart unless-stopped \
|
||||||
|
hexafit-web:latest
|
||||||
|
|
||||||
|
- name: Remove old images
|
||||||
|
run: docker image prune -f
|
||||||
|
|
||||||
|
- name: Verify
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
docker ps --filter name=hexafit-web --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" \
|
||||||
|
| grep -q hexafit-web \
|
||||||
|
&& echo "✅ Container running" \
|
||||||
|
|| (docker logs hexafit-web --tail 50 && exit 1)
|
||||||
|
curl -fsS http://127.0.0.1:5633/ > /dev/null \
|
||||||
|
&& echo "✅ HTTP OK" \
|
||||||
|
|| (docker logs hexafit-web --tail 50 && exit 1)
|
||||||
|
|
||||||
|
build-and-deploy-test:
|
||||||
|
name: Build & Deploy (Test)
|
||||||
|
runs-on: linux
|
||||||
|
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'test'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
git clone \
|
||||||
|
--depth 1 \
|
||||||
|
--branch test \
|
||||||
|
https://oauth2:${{ secrets.VIJAYA }}@gitea.hexdive.com/Vijaya_Gym/Client_Fe.git \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg NEXT_PUBLIC_CORE_API_URL="${{ secrets.NEXT_PUBLIC_CORE_API_URL }}" \
|
||||||
|
-t hexafit-web-test:latest \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Stop & remove existing container
|
||||||
|
run: |
|
||||||
|
docker stop hexafit-web-test 2>/dev/null || true
|
||||||
|
docker rm hexafit-web-test 2>/dev/null || true
|
||||||
|
|
||||||
|
- name: Start container
|
||||||
|
run: |
|
||||||
|
docker run -d \
|
||||||
|
--name hexafit-web-test \
|
||||||
|
-p 127.0.0.1:3002:3000 \
|
||||||
|
--env-file /home/vijaya/web/.env \
|
||||||
|
--restart unless-stopped \
|
||||||
|
hexafit-web-test:latest
|
||||||
|
|
||||||
|
- name: Remove old images
|
||||||
|
run: docker image prune -f
|
||||||
|
|
||||||
|
- name: Verify
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
docker ps --filter name=hexafit-web-test --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" \
|
||||||
|
| grep -q hexafit-web-test \
|
||||||
|
&& echo "✅ Container running" \
|
||||||
|
|| (docker logs hexafit-web-test --tail 50 && exit 1)
|
||||||
|
curl -fsS http://127.0.0.1:3002/ > /dev/null \
|
||||||
|
&& echo "✅ HTTP OK" \
|
||||||
|
|| (docker logs hexafit-web-test --tail 50 && exit 1)
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
FROM node:20-alpine AS deps
|
FROM node:22-alpine AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
FROM node:20-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
@@ -17,7 +17,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:20-alpine AS runner
|
FROM node:22-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ interface OnboardingLayoutProps {
|
|||||||
/** Hide the step indicator (e.g. on the final success screen). */
|
/** Hide the step indicator (e.g. on the final success screen). */
|
||||||
hideProgress?: boolean
|
hideProgress?: boolean
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// production
|
||||||
|
|
||||||
function OnboardingLayout({
|
function OnboardingLayout({
|
||||||
eyebrow,
|
eyebrow,
|
||||||
|
|||||||
Reference in New Issue
Block a user