FIX: Trying to make dev-ops chain a bit better.

This commit is contained in:
Hayden Hargreaves 2025-03-06 15:52:15 -07:00
parent ba38c95f35
commit ac0b34c1e1
5 changed files with 14 additions and 5 deletions

View File

@ -1,10 +1,10 @@
# THIS FILE DOES NOT REFLECT THE COMPOSE FILE USED ON THE SERVER
version: "3.8"
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3100:3100"
depends_on:

1
frontend/.dockerignore Normal file
View File

@ -0,0 +1 @@
.env

1
frontend/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env

View File

@ -4,12 +4,16 @@ import PasswordInput from "./PasswordInput.jsx";
import RememberMe from "./RememberMe.jsx";
import {useNavigate} from "react-router-dom";
export default function LoginForm() {
/**
* URL To the backend web server
* URL To the backend web server.
* Uses the .env var in local development, but when
* pushed to dockerhub, the .env is ignored and the real
* backend URL is used.
* @type {string}
*/
const backendUrl = "https://backend.gophernest.net";
const backendUrl = import.meta.env.VITE_BACKEND_URL || "https://backend.gophernest.net";
const [username, setUsername] = useState("");
const [remember, setRemember] = useState(false);

View File

@ -11,10 +11,13 @@ export default function Dashboard() {
const defaultPath = ["media", "vault"];
/**
* URL To the backend web server
* URL To the backend web server.
* Uses the .env var in local development, but when
* pushed to dockerhub, the .env is ignored and the real
* backend URL is used.
* @type {string}
*/
const backendUrl = "https://backend.gophernest.net";
const backendUrl = import.meta.env.VITE_BACKEND_URL || "https://backend.gophernest.net";
const [token, setToken] = useState(null);
const [path, setPath] = useState([...defaultPath]);