File tree Expand file tree Collapse file tree 5 files changed +158
-0
lines changed
Expand file tree Collapse file tree 5 files changed +158
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Mainnet Container
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ # also allow manual runs
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+
15+ steps :
16+ - name : Checkout source
17+ uses : actions/checkout@v4
18+
19+ - uses : docker/setup-qemu-action@v3
20+ - uses : docker/setup-buildx-action@v3
21+
22+ - name : Docker Hub login
23+ uses : docker/login-action@v3
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+ - name : Build & Push Mainnet Image
29+ uses : docker/build-push-action@v5
30+ with :
31+ context : .
32+ file : ./Dockerfile_mainnet
33+ push : true
34+ platforms : linux/amd64
35+ cache-from : type=gha
36+ cache-to : type=gha,mode=max
37+ tags : |
38+ ratio1/deeploy_ui:mainnet
Original file line number Diff line number Diff line change 1+ name : Build and Push Testnet & Devnet Container
2+
3+ on :
4+ push :
5+ branches : [ develop ]
6+ # also allow manual runs
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+
15+ steps :
16+ - name : Checkout source
17+ uses : actions/checkout@v4
18+
19+ - uses : docker/setup-qemu-action@v3
20+ - uses : docker/setup-buildx-action@v3
21+
22+ - name : Docker Hub login
23+ uses : docker/login-action@v3
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+ - name : Build & Push Testnet Image
29+ uses : docker/build-push-action@v5
30+ with :
31+ context : .
32+ file : ./Dockerfile_testnet
33+ push : true
34+ platforms : linux/amd64
35+ cache-from : type=gha
36+ cache-to : type=gha,mode=max
37+ tags : |
38+ ratio1/deeploy_ui:testnet
39+
40+ - name : Build & Push Devnet Image
41+ uses : docker/build-push-action@v5
42+ with :
43+ context : .
44+ file : ./Dockerfile_devnet
45+ push : true
46+ platforms : linux/amd64
47+ cache-from : type=gha
48+ cache-to : type=gha,mode=max
49+ tags : |
50+ ratio1/deeploy_ui:devnet
Original file line number Diff line number Diff line change 1+ # ---- Build stage ---------
2+ FROM node:18-slim AS builder
3+ WORKDIR /app
4+
5+
6+ COPY package*.json ./
7+ RUN npm ci
8+
9+
10+ COPY . .
11+ RUN npm run build # produces static files in /app/dist
12+
13+ # ---- Runtime stage ---------
14+ FROM nginx:alpine
15+
16+
17+ COPY --from=builder /app/dist /usr/share/nginx/html
18+
19+ EXPOSE 80
20+ CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change 1+ # ---- Build stage ---------
2+ FROM node:18-slim AS builder
3+ WORKDIR /app
4+
5+ # Build arguments for configuration
6+ ARG API_URL=https://deeploy-api.ratio1.ai
7+ ARG ENVIRONMENT=mainnet
8+
9+ # Set environment variables for the build process
10+ ENV VITE_API_URL=${API_URL}
11+ ENV VITE_ENVIRONMENT=${ENVIRONMENT}
12+
13+ COPY package*.json ./
14+ RUN npm ci
15+
16+ COPY . .
17+ RUN npm run build # produces static files in /app/dist
18+
19+ # ---- Runtime stage ---------
20+ FROM nginx:alpine
21+
22+ COPY --from=builder /app/dist /usr/share/nginx/html
23+
24+ EXPOSE 80
25+ CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change 1+ # ---- Build stage ---------
2+ FROM node:18-slim AS builder
3+ WORKDIR /app
4+
5+ # Build arguments for configuration
6+ ARG API_URL=https://testnet-deeploy-api.ratio1.ai
7+ ARG ENVIRONMENT=testnet
8+
9+ # Set environment variables for the build process
10+ ENV VITE_API_URL=${API_URL}
11+ ENV VITE_ENVIRONMENT=${ENVIRONMENT}
12+
13+ COPY package*.json ./
14+ RUN npm ci
15+
16+ COPY . .
17+ RUN npm run build # produces static files in /app/dist
18+
19+ # ---- Runtime stage ---------
20+ FROM nginx:alpine
21+
22+ COPY --from=builder /app/dist /usr/share/nginx/html
23+
24+ EXPOSE 80
25+ CMD ["nginx", "-g", "daemon off;"]
You can’t perform that action at this time.
0 commit comments