feat: self host

This commit is contained in:
Ibrahima G. Coulibaly
2024-07-11 03:33:37 +01:00
parent 6ef65207b9
commit 5cc4f4032f
5 changed files with 131 additions and 79 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
node_modules
playwright-report
coverage
dist
test-results

171
.idea/workspace.xml generated
View File

@@ -4,10 +4,12 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: group list ui"> <list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: reverse list ui">
<change afterPath="$PROJECT_DIR$/.dockerignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
<change afterPath="$PROJECT_DIR$/img.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/list/reverse/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/reverse/index.tsx" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/list/reverse/service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/reverse/service.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -29,6 +31,9 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RESET_MODE" value="HARD" /> <option name="RESET_MODE" value="HARD" />
</component> </component>
<component name="KubernetesApiProvider"><![CDATA[{
"isMigrated": true
}]]></component>
<component name="MarkdownSettingsMigration"> <component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" /> <option name="stateVersion" value="1" />
</component> </component>
@@ -44,44 +49,46 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;, "ASKED_ADD_EXTERNAL_FILES": "true",
&quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;, "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
&quot;Playwright.JoinText Component.executor&quot;: &quot;Run&quot;, "Docker.Dockerfile build.executor": "Run",
&quot;Playwright.JoinText Component.should merge text pieces with specified join character.executor&quot;: &quot;Run&quot;, "Docker.Dockerfile.executor": "Run",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "Playwright.JoinText Component.executor": "Run",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
&quot;Vitest.compute function (1).executor&quot;: &quot;Run&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;Vitest.compute function.executor&quot;: &quot;Run&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;Vitest.mergeText.executor&quot;: &quot;Run&quot;, "Vitest.compute function (1).executor": "Run",
&quot;Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor&quot;: &quot;Run&quot;, "Vitest.compute function.executor": "Run",
&quot;Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor&quot;: &quot;Run&quot;, "Vitest.mergeText.executor": "Run",
&quot;git-widget-placeholder&quot;: &quot;main&quot;, "Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;, "Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, "git-widget-placeholder": "main",
&quot;last_opened_file_path&quot;: &quot;C:/Users/HP/IdeaProjects/omni-tools/src/components/options&quot;, "ignore.virus.scanning.warn.message": "true",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "kotlin-language-version-configured": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "last_opened_file_path": "C:/Users/HP/IdeaProjects/omni-tools/src/components/options",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.detected.package.tslint": "true",
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;npm.dev.executor&quot;: &quot;Run&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;npm.lint.executor&quot;: &quot;Run&quot;, "nodejs_package_manager_path": "npm",
&quot;npm.prebuild.executor&quot;: &quot;Run&quot;, "npm.dev.executor": "Run",
&quot;npm.script:create:tool.executor&quot;: &quot;Run&quot;, "npm.lint.executor": "Run",
&quot;npm.test.executor&quot;: &quot;Run&quot;, "npm.prebuild.executor": "Run",
&quot;npm.test:e2e.executor&quot;: &quot;Run&quot;, "npm.script:create:tool.executor": "Run",
&quot;npm.test:e2e:run.executor&quot;: &quot;Run&quot;, "npm.test.executor": "Run",
&quot;prettierjs.PrettierConfiguration.Package&quot;: &quot;C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\prettier&quot;, "npm.test:e2e.executor": "Run",
&quot;project.structure.last.edited&quot;: &quot;Problems&quot;, "npm.test:e2e:run.executor": "Run",
&quot;project.structure.proportion&quot;: &quot;0.0&quot;, "prettierjs.PrettierConfiguration.Package": "C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\prettier",
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, "project.structure.last.edited": "Problems",
&quot;settings.editor.selected.configurable&quot;: &quot;settings.typescriptcompiler&quot;, "project.structure.proportion": "0.0",
&quot;ts.external.directory.path&quot;: &quot;C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib&quot;, "project.structure.side.proportion": "0.2",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "settings.editor.selected.configurable": "settings.typescriptcompiler",
"ts.external.directory.path": "C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
"vue.rearranger.settings.migration": "true"
} }
}</component> }]]></component>
<component name="ReactDesignerToolWindowState"> <component name="ReactDesignerToolWindowState">
<option name="myId2Visible"> <option name="myId2Visible">
<map> <map>
@@ -106,18 +113,32 @@
<recent name="C:\Users\HP\IdeaProjects\omni-tools\src\tools" /> <recent name="C:\Users\HP\IdeaProjects\omni-tools\src\tools" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.dev"> <component name="RunManager" selected="Docker.Dockerfile">
<configuration name="JoinText Component.should merge text pieces with specified join character" type="JavaScriptTestRunnerPlaywright" temporary="true" nameIsGenerated="true"> <configuration name="Dockerfile build" type="docker-deploy" factoryName="dockerfile" temporary="true" server-name="Docker">
<node-interpreter value="project" /> <deployment type="dockerfile">
<playwright-package value="$PROJECT_DIR$/node_modules/@playwright/test" /> <settings>
<working-dir value="$PROJECT_DIR$" /> <option name="imageTag" value="omnitools" />
<envs /> <option name="buildCliOptions" value="--target build" />
<scope-kind value="TEST" /> <option name="buildKitEnabled" value="true" />
<test-file value="$PROJECT_DIR$/src/pages/string/join/string-join.e2e.spec.ts" /> <option name="containerName" value="omni-tools" />
<test-names> <option name="publishAllPorts" value="true" />
<test-name value="JoinText Component" /> <option name="sourceFilePath" value="Dockerfile" />
<test-name value="should merge text pieces with specified join character" /> </settings>
</test-names> </deployment>
<method v="2" />
</configuration>
<configuration name="Dockerfile" type="docker-deploy" factoryName="dockerfile" temporary="true" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
<method v="2" />
</configuration>
<configuration default="true" type="docker-deploy" factoryName="dockerfile" temporary="true">
<deployment type="dockerfile">
<settings />
</deployment>
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
@@ -140,16 +161,6 @@
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="test" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="test" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="test:e2e" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="test:e2e" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
@@ -160,13 +171,20 @@
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<list>
<item itemvalue="Docker.Dockerfile" />
<item itemvalue="Docker.Dockerfile build" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.lint" />
<item itemvalue="npm.test:e2e" />
</list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Docker.Dockerfile build" />
<item itemvalue="Docker.Dockerfile" />
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.lint" /> <item itemvalue="npm.lint" />
<item itemvalue="npm.test:e2e" /> <item itemvalue="npm.test:e2e" />
<item itemvalue="Playwright.JoinText Component.should merge text pieces with specified join character" />
<item itemvalue="npm.test" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@@ -206,15 +224,8 @@
<workItem from="1720557527691" duration="3245000" /> <workItem from="1720557527691" duration="3245000" />
<workItem from="1720564427492" duration="1523000" /> <workItem from="1720564427492" duration="1523000" />
<workItem from="1720613598176" duration="8000" /> <workItem from="1720613598176" duration="8000" />
<workItem from="1720655252208" duration="2568000" /> <workItem from="1720655252208" duration="3975000" />
</task> <workItem from="1720661825389" duration="3107000" />
<task id="LOCAL-00045" summary="fix: create-tool.mjs">
<option name="closed" value="true" />
<created>1719188162583</created>
<option name="number" value="00045" />
<option name="presentableId" value="LOCAL-00045" />
<option name="project" value="LOCAL" />
<updated>1719188162583</updated>
</task> </task>
<task id="LOCAL-00046" summary="feat: change colors in png init"> <task id="LOCAL-00046" summary="feat: change colors in png init">
<option name="closed" value="true" /> <option name="closed" value="true" />
@@ -600,7 +611,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1720656867853</updated> <updated>1720656867853</updated>
</task> </task>
<option name="localTasksCounter" value="94" /> <task id="LOCAL-00094" summary="feat: reverse list ui">
<option name="closed" value="true" />
<created>1720658257129</created>
<option name="number" value="00094" />
<option name="presentableId" value="LOCAL-00094" />
<option name="project" value="LOCAL" />
<updated>1720658257129</updated>
</task>
<option name="localTasksCounter" value="95" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -644,7 +663,6 @@
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" /> <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_NEW_TODO" value="false" /> <option name="CHECK_NEW_TODO" value="false" />
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="feat: make responsive" />
<MESSAGE value="feat: make tool responsive" /> <MESSAGE value="feat: make tool responsive" />
<MESSAGE value="chore: make tool examples responsive" /> <MESSAGE value="chore: make tool examples responsive" />
<MESSAGE value="chore: loading screen" /> <MESSAGE value="chore: loading screen" />
@@ -669,7 +687,8 @@
<MESSAGE value="fix: style" /> <MESSAGE value="fix: style" />
<MESSAGE value="feat: find unique ui" /> <MESSAGE value="feat: find unique ui" />
<MESSAGE value="feat: group list ui" /> <MESSAGE value="feat: group list ui" />
<option name="LAST_COMMIT_MESSAGE" value="feat: group list ui" /> <MESSAGE value="feat: reverse list ui" />
<option name="LAST_COMMIT_MESSAGE" value="feat: reverse list ui" />
</component> </component>
<component name="XSLT-Support.FileAssociations.UIState"> <component name="XSLT-Support.FileAssociations.UIState">
<expand /> <expand />

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:20 as build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -3,10 +3,14 @@
Welcome to **OmniTools**, an open-source alternative to OnlineTools.com. Welcome to **OmniTools**, an open-source alternative to OnlineTools.com.
This project offers a variety of online tools to help with everyday tasks, This project offers a variety of online tools to help with everyday tasks,
all available for free and open for community contributions. Please don't forget to star the repo to support us. all available for free and open for community contributions. Please don't forget to star the repo to support us.
Here is the [live](https://omnitools.netlify.app/) website.
![img.png](img.png)
## Table of Contents ## Table of Contents
- [Features](#features) - [Features](#features)
- [Self-host](#self-host)
- [Contribute](#contribute) - [Contribute](#contribute)
- [License](#license) - [License](#license)
- [Contact](#contact) - [Contact](#contact)
@@ -23,9 +27,9 @@ OmniTools includes a variety of tools, such as:
- Generate prime numbers, generate perfect numbers etc. - Generate prime numbers, generate perfect numbers etc.
3. **Text Tools** 3. **String/List Tools**
- Case converters, text cleaners, text formatters, etc. - Case converters, shuffle list, text formatters, etc.
4. **Date and Time Tools** 4. **Date and Time Tools**
@@ -33,7 +37,13 @@ OmniTools includes a variety of tools, such as:
5. **Miscellaneous Tools** 5. **Miscellaneous Tools**
- JSON, XML tools, etc. - JSON, XML tools, CSV tools etc.
## Self-host
```bash
docker run -d --name omni-tools --restart unless-stopped -p 8080:80 iib0011/omni-tools:latest
```
## Contribute ## Contribute

BIN
img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB