Compare commits
19 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
996a37bc7e | |
|
|
9e24cba3b9 | |
|
|
f71151d19c | |
|
|
c35eefd2a9 | |
|
|
ad10f2450a | |
|
|
0edbb9c728 | |
|
|
5311eeb1b5 | |
|
|
5a5e61a603 | |
|
|
17c32f1ef5 | |
|
|
b14dad3a3b | |
|
|
15a7234fa4 | |
|
|
2dbf55bff1 | |
|
|
a74a035912 | |
|
|
8fef50ba86 | |
|
|
3545facd5f | |
|
|
d2bf305446 | |
|
|
b91e8e58a8 | |
|
|
0f42b53ab4 | |
|
|
f36d150c08 |
|
|
@ -4,35 +4,44 @@ on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build-backend:
|
build-backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Build and push Backend (Kaniko)
|
||||||
uses: docker/setup-buildx-action@v2
|
run: |
|
||||||
|
JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1)
|
||||||
|
echo "Using volumes from: $JOB_CONTAINER"
|
||||||
|
|
||||||
- name: Build and push Backend
|
docker run --rm \
|
||||||
uses: docker/build-push-action@v4
|
--volumes-from "$JOB_CONTAINER" \
|
||||||
with:
|
gcr.io/kaniko-project/executor:latest \
|
||||||
context: ./backend
|
--context=dir:///workspace/deepkoluguri/chitfund/backend \
|
||||||
push: true
|
--dockerfile=Dockerfile \
|
||||||
tags: 192.168.8.250:5000/chitfund-backend:latest
|
--destination=192.168.8.250:5000/chitfund-backend:latest \
|
||||||
# Local registry is insecure
|
--insecure \
|
||||||
labels: |
|
--skip-tls-verify
|
||||||
org.opencontainers.image.source=${{ gitea.repository_url }}
|
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Build and push Frontend (Kaniko)
|
||||||
uses: docker/setup-buildx-action@v2
|
run: |
|
||||||
|
JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1)
|
||||||
|
echo "Using volumes from: $JOB_CONTAINER"
|
||||||
|
|
||||||
- name: Build and push Frontend
|
docker run --rm \
|
||||||
uses: docker/build-push-action@v4
|
--volumes-from "$JOB_CONTAINER" \
|
||||||
with:
|
gcr.io/kaniko-project/executor:latest \
|
||||||
context: ./luckychit
|
--context=dir:///workspace/deepkoluguri/chitfund/luckychit \
|
||||||
push: true
|
--dockerfile=Dockerfile \
|
||||||
tags: 192.168.8.250:5000/chitfund-frontend:latest
|
--destination=192.168.8.250:5000/chitfund-frontend:latest \
|
||||||
|
--insecure \
|
||||||
|
--skip-tls-verify
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Your **FREE, zero-transaction-fee UPI payment system** is ready to use!
|
Your **FREE, zero-transaction-fee UPI payment system** is ready to use!
|
||||||
|
|
||||||
---
|
----
|
||||||
|
|
||||||
## ✨ What You Have Now
|
## ✨ What You Have Now
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
# Frontend Dockerfile for Chitfund (Flutter Web)
|
# Frontend Dockerfile for Chitfund (Flutter Web)
|
||||||
FROM node:20-slim
|
FROM ghcr.io/cirruslabs/flutter:stable AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# We serve the build/web directory.
|
|
||||||
# NOTE: This Dockerfile assumes you have already run 'flutter build web'
|
|
||||||
# or we will use a multi-stage build if you prefer.
|
|
||||||
# For simplicity in this home lab, we copy the build output.
|
|
||||||
|
|
||||||
COPY package*.json ./
|
|
||||||
RUN npm install express
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN flutter pub get
|
||||||
|
RUN flutter build web --release
|
||||||
|
|
||||||
|
FROM node:20-slim
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm init -y && npm install express
|
||||||
|
COPY --from=build /app/build/web ./build/web
|
||||||
|
COPY web-server.js .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ app.use(express.static(BUILD_DIR, {
|
||||||
|
|
||||||
// Handle Flutter routes (SPA - Single Page Application)
|
// Handle Flutter routes (SPA - Single Page Application)
|
||||||
// Any route not found as a static file should serve index.html
|
// Any route not found as a static file should serve index.html
|
||||||
app.get('*', (req, res) => {
|
app.use( (req, res) => {
|
||||||
res.sendFile(path.join(BUILD_DIR, 'index.html'));
|
res.sendFile(path.join(BUILD_DIR, 'index.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue