Compare commits
2 Commits
d7b6c345b5
...
1de9c778ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1de9c778ff | ||
|
26ee673270
|
14
.gitea/workflows/build.yml
Normal file
14
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Build and release image
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: imgbuilder
|
||||
steps:
|
||||
- name: Build and push image
|
||||
uses: https://gitea.konchin.com/action/docker@main
|
||||
with:
|
||||
registry-certificate: ${{ vars.ROOTCA }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
5
webpage/.env.example
Normal file
5
webpage/.env.example
Normal file
@@ -0,0 +1,5 @@
|
||||
# API Base URL for backend services
|
||||
# For production deployment, set this to your backend API URL
|
||||
# Example: EXTERNAL_URL=https://api.yourdomain.com
|
||||
# Example: EXTERNAL_URL=http://your-server-ip:8080
|
||||
EXTERNAL_URL=http://localhost:8080
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Image, Alias } from './types';
|
||||
|
||||
const API_BASE_URL = 'http://localhost:8080';
|
||||
const API_BASE_URL = import.meta.env.EXTERNAL_URL || 'http://localhost:8080';
|
||||
|
||||
// Pagination configuration
|
||||
export const ALIASES_PER_PAGE = 10; // Number of aliases to show per page
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// src/pages/Login.tsx
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const API_BASE_URL = import.meta.env.EXTERNAL_URL || 'http://localhost:8080';
|
||||
|
||||
interface LoginProps {
|
||||
onLoginSuccess: () => void;
|
||||
}
|
||||
@@ -20,7 +22,7 @@ export default function Login({ onLoginSuccess }: LoginProps) {
|
||||
}
|
||||
|
||||
// Call backend login endpoint
|
||||
fetch('http://localhost:8080/auth/login', {
|
||||
fetch(`${API_BASE_URL}/auth/login`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user