diff --git a/.github/workflows/docker-images.yaml b/.github/workflows/docker-images.yaml
index be9fbcb..273ea5d 100644
--- a/.github/workflows/docker-images.yaml
+++ b/.github/workflows/docker-images.yaml
@@ -9,7 +9,7 @@ on:
jobs:
build:
- name: Build container
+ name: Build image
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -35,13 +35,13 @@ jobs:
run: cd server && go test -v ./...
- name: Login to DockerHub
- uses: docker/login-action@v1
+ uses: docker/login-action@v2
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.HUB_TOKEN }}
- name: Log in to ghcr.io
- uses: docker/login-action@v1
+ uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@@ -82,7 +82,7 @@ jobs:
npm ci install
CI=false GENERATE_SOURCEMAP=false npm run build:docker
- - name: Build and push
+ - name: Build docker image and push
id: docker_build
uses: docker/build-push-action@v2
with:
diff --git a/README.md b/README.md
index e9c1c80..388d8f0 100644
--- a/README.md
+++ b/README.md
@@ -52,12 +52,13 @@ docker build . -t shortpaste
You can customize the behavior using environment variables:.
-| Environment Variable | Default Value | Behaviour |
-| -------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------ |
-| `API_KEY` | `CHANGE-IT-ASAP` | API key used to communicate with the API. |
-| `BASE_PATH` | `/` | App base path (use it if the app does not have run its dedicated domain name). |
-| `DEBUG` | | Whether the app runs in debug mode or not (basically just more logs). |
-| `PORT` | 8080 | Port on which app is running, **should not be changed**. |
+| Environment Variable | Default Value | Behaviour |
+| -------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
+| `API_KEY` | `CHANGE-IT-ASAP` | API key used to communicate with the API. |
+| `BASE_PATH` | `/` | App base path (use it if the app does not have run its dedicated domain name). |
+| `DOMAIN` | | Override shortened URL domain in front, when copy to clipboard (default is the actual page domain). Example: `https://sho.rt` |
+| `DEBUG` | | Whether the app runs in debug mode or not (basically just more logs). |
+| `PORT` | 8080 | Port on which app is running, **should not be changed**. |
## Securing
@@ -137,8 +138,8 @@ Your web browser should open on `http://localhost:3000`. The app is configured t
## TODO
-- [ ] optimize build
-- [ ] allow user to set the public url for shortened content
+- [x] optimize build time
+- [x] allow user to set the public url for shortened content
- [x] move from sqlite3 to modernc.org/sqlite to compile without CGO (and use scratch, lighter image)
- [ ] display status with version
- [ ] allow user to change language
diff --git a/front/src/App.tsx b/front/src/App.tsx
index 890f32f..285b70a 100644
--- a/front/src/App.tsx
+++ b/front/src/App.tsx
@@ -1,27 +1,48 @@
import { Route } from "react-router-dom";
-import classes from './app.module.scss';
-import {MemoryRouter as Router} from "react-router-dom";
+import classes from "./app.module.scss";
+import { MemoryRouter as Router } from "react-router-dom";
import { ThemeProvider, createTheme } from "@mui/material";
-import { Content, MainMenu } from './components';
-import { Files, Links, Texts } from './pages';
+import { Content, MainMenu } from "./components";
+import { Files, Links, Texts } from "./pages";
+import AppContext from "./app_context";
+import { useEffect, useState } from "react";
+import { App as ShortApp } from "./common/data.types";
+import { appRepository } from "./repositories";
+import { config } from "./core";
const theme = createTheme({
- spacing: 16,
+ spacing: 16,
});
function App() {
- return
-
-