feat: add docker configuration
This commit is contained in:
parent
821712f43b
commit
cf2f624ae4
21 changed files with 232 additions and 13 deletions
12
Foxnouns.Frontend/Dockerfile
Normal file
12
Foxnouns.Frontend/Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM docker.io/node:22
|
||||
|
||||
RUN mkdir -p /app/node_modules && chown -R node:node /app
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
USER node
|
||||
RUN yarn
|
||||
COPY --chown=node:node . .
|
||||
|
||||
RUN yarn build
|
||||
|
||||
CMD ["yarn", "start"]
|
|
@ -1,5 +1,5 @@
|
|||
import { TFunction } from "i18next";
|
||||
import Alert from "react-bootstrap/Alert";
|
||||
import { Alert } from "react-bootstrap";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import {
|
||||
ApiError,
|
||||
|
|
|
@ -3,9 +3,7 @@ import Meta from "~/lib/api/meta";
|
|||
import { User, UserSettings } from "~/lib/api/user";
|
||||
import Logo from "./Logo";
|
||||
|
||||
import Nav from "react-bootstrap/Nav";
|
||||
import Navbar from "react-bootstrap/Navbar";
|
||||
import NavDropdown from "react-bootstrap/NavDropdown";
|
||||
import { Nav, Navbar, NavDropdown } from "react-bootstrap";
|
||||
import { BrightnessHigh, BrightnessHighFill, MoonFill } from "react-bootstrap-icons";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import "dotenv/config";
|
||||
import { env } from "node:process";
|
||||
|
||||
export const API_BASE = env.API_BASE || "https://pronouns.localhost/api";
|
||||
|
|
|
@ -10,10 +10,8 @@ import {
|
|||
ShouldRevalidateFunction,
|
||||
} from "@remix-run/react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import Button from "react-bootstrap/Button";
|
||||
import { Form, Button, Alert } from "react-bootstrap";
|
||||
import ErrorAlert from "~/components/ErrorAlert";
|
||||
import Alert from "react-bootstrap/Alert";
|
||||
|
||||
export const shouldRevalidate: ShouldRevalidateFunction = ({ actionResult }) => {
|
||||
return !actionResult;
|
||||
|
|
|
@ -6,11 +6,7 @@ import {
|
|||
ActionFunctionArgs,
|
||||
} from "@remix-run/node";
|
||||
import { Form as RemixForm, useActionData, useLoaderData } from "@remix-run/react";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import Button from "react-bootstrap/Button";
|
||||
import ButtonGroup from "react-bootstrap/ButtonGroup";
|
||||
import ListGroup from "react-bootstrap/ListGroup";
|
||||
import { Row, Col } from "react-bootstrap";
|
||||
import { Form, Button, ButtonGroup, ListGroup, Row, Col } from "react-bootstrap";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import i18n from "~/i18next.server";
|
||||
import serverRequest, { getToken, writeCookie } from "~/lib/request.server";
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"compression": "^1.7.4",
|
||||
"cookie": "^0.6.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
"i18next": "^23.15.1",
|
||||
"i18next-browser-languagedetector": "^8.0.0",
|
||||
|
|
|
@ -2554,7 +2554,7 @@ domutils@^3.0.1, domutils@^3.1.0:
|
|||
domelementtype "^2.3.0"
|
||||
domhandler "^5.0.3"
|
||||
|
||||
dotenv@^16.0.0:
|
||||
dotenv@^16.0.0, dotenv@^16.4.5:
|
||||
version "16.4.5"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
|
||||
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue