diff --git a/Dockerfile b/Dockerfile index 22dd3ccd3..b5a9e2675 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,6 @@ FROM node:20.5-slim WORKDIR /app -ARG UID=1001 -ARG GID=1001 -RUN groupadd -g $GID homarr-group -RUN useradd -r -u $UID -g $GID homarr - # Define node.js environment variables ARG PORT=7575 @@ -28,10 +23,9 @@ COPY ./drizzle/migrate ./migrate COPY ./tsconfig.json ./migrate/tsconfig.json RUN mkdir /data -RUN chown -R homarr:homarr-group /data # Install dependencies -RUN apt-get update -y && apt-get install -y openssl wget +RUN apt update && apt install -y openssl wget # Move node_modules to temp location to avoid overwriting RUN mv node_modules _node_modules @@ -54,13 +48,13 @@ EXPOSE $PORT ENV PORT=${PORT} ENV DATABASE_URL "file:/data/db.sqlite" -ENV NEXTAUTH_URL "http://localhost:3000" +ENV NEXTAUTH_URL "http://localhost:7575" ENV PORT 7575 ENV NEXTAUTH_SECRET NOT_IN_USE_BECAUSE_JWTS_ARE_UNUSED HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT} || exit 1 -USER homarr - -CMD ["sh", "./scripts/run.sh"] \ No newline at end of file +VOLUME [ "/app/data/configs" ] +VOLUME [ "/data" ] +ENTRYPOINT ["sh", "./scripts/run.sh"] diff --git a/data/default.json b/data/default.json new file mode 100644 index 000000000..910d736f7 --- /dev/null +++ b/data/default.json @@ -0,0 +1,513 @@ +{ + "schemaVersion": 1, + "configProperties": { + "name": "default" + }, + "categories": [], + "wrappers": [ + { + "id": "default", + "position": 0 + } + ], + "apps": [ + { + "id": "5df743d9-5cb1-457c-85d2-64ff86855652", + "name": "Documentation", + "url": "https://homarr.dev", + "behaviour": { + "onClickUrl": "https://homarr.dev", + "externalUrl": "https://homarr.dev", + "isOpeningNewTab": true + }, + "network": { + "enabledStatusChecker": false, + "statusCodes": [ + "200" + ] + }, + "appearance": { + "iconUrl": "/imgs/logo/logo.png", + "appNameStatus": "normal", + "positionAppName": "column", + "lineClampAppName": 1 + }, + "integration": { + "type": null, + "properties": [] + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 5, + "y": 1 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "sm": { + "location": { + "x": 0, + "y": 1 + }, + "size": { + "width": 1, + "height": 2 + } + }, + "lg": { + "location": { + "x": 6, + "y": 1 + }, + "size": { + "width": 2, + "height": 2 + } + } + } + }, + { + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a337", + "name": "Discord", + "url": "https://discord.com/invite/aCsmEV5RgA", + "behaviour": { + "onClickUrl": "https://discord.com/invite/aCsmEV5RgA", + "isOpeningNewTab": true, + "externalUrl": "https://discord.com/invite/aCsmEV5RgA", + "tooltipDescription": "Join our Discord server! We're waiting for your ideas and feedback. " + }, + "network": { + "enabledStatusChecker": false, + "statusCodes": [ + "200" + ] + }, + "appearance": { + "iconUrl": "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/discord.png", + "appNameStatus": "normal", + "positionAppName": "row-reverse", + "lineClampAppName": 1 + }, + "integration": { + "type": null, + "properties": [] + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 3, + "y": 1 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "sm": { + "location": { + "x": 1, + "y": 4 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 4, + "y": 0 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + }, + { + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a330", + "name": "Contribute", + "url": "https://github.com/ajnart/homarr", + "behaviour": { + "onClickUrl": "https://github.com/ajnart/homarr", + "externalUrl": "https://github.com/ajnart/homarr", + "isOpeningNewTab": true, + "tooltipDescription": "" + }, + "network": { + "enabledStatusChecker": false, + "statusCodes": [] + }, + "appearance": { + "iconUrl": "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/github.png", + "appNameStatus": "normal", + "positionAppName": "row-reverse", + "lineClampAppName": 2 + }, + "integration": { + "type": null, + "properties": [] + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 3, + "y": 2 + }, + "size": { + "width": 2, + "height": 1 + } + }, + "sm": { + "location": { + "x": 1, + "y": 3 + }, + "size": { + "width": 2, + "height": 1 + } + }, + "lg": { + "location": { + "x": 2, + "y": 0 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + }, + { + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a990", + "name": "Donate", + "url": "https://ko-fi.com/ajnart", + "behaviour": { + "onClickUrl": "https://ko-fi.com/ajnart", + "externalUrl": "https://ko-fi.com/ajnart", + "isOpeningNewTab": true, + "tooltipDescription": "Please consider making a donation" + }, + "network": { + "enabledStatusChecker": false, + "statusCodes": [ + "200" + ] + }, + "appearance": { + "iconUrl": "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/ko-fi.png", + "appNameStatus": "normal", + "positionAppName": "row-reverse", + "lineClampAppName": 1 + }, + "integration": { + "type": null, + "properties": [] + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 4, + "y": 1 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "sm": { + "location": { + "x": 2, + "y": 4 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 6, + "y": 0 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + } + ], + "widgets": [ + { + "id": "e3004052-6b83-480e-b458-56e8ccdca5f0", + "type": "weather", + "properties": { + "displayInFahrenheit": false, + "location": { + "name": "Paris", + "latitude": 48.85341, + "longitude": 2.3488 + }, + "displayCityName": true + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 5, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "sm": { + "location": { + "x": 2, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + }, + { + "id": "971aa859-8570-49a1-8d34-dd5c7b3638d1", + "type": "date", + "properties": { + "display24HourFormat": true, + "dateFormat": "hide", + "enableTimezone": false, + "timezoneLocation": { + "name": "Paris", + "latitude": 48.85341, + "longitude": 2.3488 + }, + "titleState": "city" + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "sm": { + "location": { + "x": 1, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "md": { + "location": { + "x": 4, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 8, + "y": 0 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + }, + { + "id": "f252768d-9e69-491b-b6b4-8cad04fa30e8", + "type": "date", + "properties": { + "display24HourFormat": true, + "dateFormat": "hide", + "enableTimezone": true, + "timezoneLocation": { + "name": "Tokyo", + "latitude": 35.6895, + "longitude": 139.69171 + }, + "titleState": "city" + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "sm": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "md": { + "location": { + "x": 3, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 8, + "y": 1 + }, + "size": { + "width": 2, + "height": 1 + } + } + } + }, + { + "id": "86b1921f-efa7-410f-92dd-79553bf3264d", + "type": "notebook", + "properties": { + "showToolbar": true, + "content": "
We're glad that you're here! Homarr is a modern and easy to use dashboard that helps you to organize and manage your home network from one place. Control is at your fingertips.
We recommend you to read the getting started guide first. To edit this board you must enter the edit mode - only administrators can do this. Adding an app is the first step you should take. You can do this by clicking the Add tile button at the top right and select App. After you provided an internal URL, external URL and selected an icon you can drag it around when holding down the left mouse button. Make it bigger or smaller using the drag icon at the bottom right. When you're happy with it's position, you must exit edit mode to save your board. Adding widgets works the same way but may require additional configuration - read the documentation for more information.
To remove this widget, you must log in to your administrator account and click on the menu to delete it.
Your TODO list:
Read the documentation
Add your first app
Resize and drag your app to a different position
Add the clock widget to your dashboard
Create a new user
/data to a writeable location with
+ enough disk space. For this, you must add the following mounting point to your docker
+ compose: {' - /data:/data'}
+ {error && JSON.stringify(error)}
+
+ {errorMessage && (
+ {errorMessage}
+ )}
+