Moved bind mount for config file to its own folder

This commit is contained in:
Jordan Roher 2023-12-13 15:52:04 -08:00
parent 2809dd0fba
commit 6bae2f707b
6 changed files with 46 additions and 37 deletions

View File

@ -4,5 +4,5 @@ services:
ports:
- 4173:4173
volumes:
- ./config.json:/app/src/config.json
- ./config.json:/app/src/config/config.json
- ./icons:/app/public/icons # or wherever, JSON icon paths are relative to /app/public

View File

@ -30,6 +30,12 @@ Inspired by [Ben Phelps' Homepage](https://gethomepage.dev/) and [Umbrel](https:
<img src="./preview-dark.jpg" alt="Dark mode" />
# Change history
## 1.2.0
- Moved `config.json` bind mount destination to `/app/src/config/config.json` for improved Portainer and volume support. The previous bind mount location will continue to work, but we recommend updating your bind mounts.
# Docker
## Sample Docker compose
@ -44,7 +50,7 @@ services:
- TITLE=Starbase 80
- LOGO=/starbase80.jpg
volumes:
- ./config.json:/app/src/config.json
- ./config.json:/app/src/config/config.json
- ./public/favicon.ico:/app/public/favicon.ico
- ./public/logo.png:/app/public/logo.png
- ./public/icons:/app/public/icons
@ -66,8 +72,8 @@ services:
## Volumes (bind mounts)
| Path | Required | Notes |
| ----------------------- | -------- | ----------------------------------------------------------------------------- |
| /app/src/config.json | true | Configuration with list of sites and links |
| --------------------------- | -------- | ----------------------------------------------------------------------------- |
| /app/src/config/config.json | true | Configuration with list of sites and links |
| /app/public/favicon.ico | false | Website favicon |
| /app/public/logo.png | false | Logo in the header |
| /app/public/icons | false | Or wherever you want to put them, JSON icon paths are relative to /app/public |

View File

@ -1,26 +1 @@
[
{
"category": "Example category",
"services": [
{
"name": "Check the readme",
"uri": "https://github.com/notclickable-jordan/starbase-80",
"description": "Use your own icons",
"icon": "github"
},
{
"name": "Bind mount",
"uri": "https://github.com/notclickable-jordan/docker-symphony",
"description": "to /app/src/config.json",
"icon": "docker"
},
{
"name": "Watch Lower Decks",
"uri": "https://www.paramountplus.com/",
"description": "On Paramount+",
"icon": "mdi-image-filter-hdr",
"iconColor": "blue-500"
}
]
}
]
[]

26
src/config/config.json Normal file
View File

@ -0,0 +1,26 @@
[
{
"category": "Example category",
"services": [
{
"name": "Check the readme",
"uri": "https://github.com/notclickable-jordan/starbase-80",
"description": "Use your own icons",
"icon": "github"
},
{
"name": "Bind mount",
"uri": "https://github.com/notclickable-jordan/docker-symphony",
"description": "to /app/src/config/config.json",
"icon": "docker"
},
{
"name": "Watch Lower Decks",
"uri": "https://www.paramountplus.com/",
"description": "On Paramount+",
"icon": "mdi-image-filter-hdr",
"iconColor": "blue-500"
}
]
}
]

View File

@ -1,7 +1,9 @@
import React from "react";
import { Header } from "../components/header";
import { ServiceCatalogList } from "../components/service-catalogs";
import userServices from "../config.json";
import userServicesOld from "../config.json";
import userServices from "../config/config.json";
import { is } from "../shared/is";
import { IServiceCatalog } from "../shared/types";
import { SHOWHEADER, SHOWHEADERLINE, SHOWHEADERTOP } from "../variables";
@ -11,7 +13,7 @@ interface IProps {
}
export const IndexPage: React.FunctionComponent<IProps> = ({ icon, title }) => {
const mySerices = userServices as IServiceCatalog[];
const mySerices = (is.null(userServicesOld) ? userServices : userServicesOld) as IServiceCatalog[];
let headerClassName = "p-4";

View File

@ -1 +1 @@
1.1.6
1.2.0