From 442ef142fc4bd7c430d8a1314535f03576f616f6 Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Sun, 24 Apr 2022 12:23:44 -0500 Subject: Rebranded from 'ferdi' to 'ferdium' (#4) --- .all-contributorsrc | 4 +- .do/deploy.template.yaml | 20 ++-- .env.example | 6 +- CONTRIBUTING.md | 20 ++-- LICENSE | 2 +- README.md | 39 ++++---- app/Controllers/Http/DashboardController.js | 4 +- app/Controllers/Http/RecipeController.js | 2 +- app/Controllers/Http/StaticController.js | 12 +-- app/Controllers/Http/UserController.js | 7 +- config/database.js | 6 +- docker/README.md | 144 ++++++++++++++-------------- docker/docker-compose.yml | 16 ++-- docker/entrypoint.sh | 26 ++--- package-lock.json | 2 +- package.json | 4 +- resources/announcements/version.json | 8 +- resources/views/dashboard/account.edge | 2 +- resources/views/dashboard/delete.edge | 2 +- resources/views/dashboard/login.edge | 2 +- resources/views/dashboard/transfer.edge | 2 +- resources/views/layouts/main.edge | 2 +- resources/views/layouts/v2.edge | 4 +- resources/views/others/import.edge | 6 +- resources/views/others/index.edge | 4 +- resources/views/others/new.edge | 4 +- start/events.js | 4 +- start/routes.js | 2 +- 28 files changed, 180 insertions(+), 176 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 43e8f1c..ce730aa 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -44,8 +44,8 @@ } ], "contributorsPerLine": 7, - "projectName": "server", - "projectOwner": "getferdi", + "projectName": "ferdium-server", + "projectOwner": "ferdium", "repoType": "github", "repoHost": "https://github.com", "skipCi": true diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index a17a225..f4321fd 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -4,43 +4,43 @@ spec: - rule: DOMAIN_FAILED databases: - engine: PG - name: ferdi-db + name: ferdium-db num_nodes: 1 size: db-s-dev-database version: "12" - name: ferdi-server + name: ferdium-server region: lon services: - dockerfile_path: Dockerfile git: branch: master - repo_clone_url: https://github.com/getferdi/server.git + repo_clone_url: https://github.com/ferdium/ferdium-server.git envs: - key: DB_HOST scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.HOSTNAME} + value: ${ferdium-db.HOSTNAME} - key: DB_PORT scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.PORT} + value: ${ferdium-db.PORT} - key: DB_USER scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.USERNAME} + value: ${ferdium-db.USERNAME} - key: DB_PASSWORD scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.PASSWORD} + value: ${ferdium-db.PASSWORD} - key: DB_DATABASE scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.DATABASE} + value: ${ferdium-db.DATABASE} - key: DB_CA_CERT scope: RUN_AND_BUILD_TIME - value: ${ferdi-db.CA_CERT} + value: ${ferdium-db.CA_CERT} - key: DB_CONNECTION scope: RUN_AND_BUILD_TIME value: pg http_port: 8080 instance_count: 1 instance_size_slug: basic-xxs - name: ferdi-server + name: ferdium-server routes: - path: / source_dir: / diff --git a/.env.example b/.env.example index 36ae547..884ab50 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ HOST=127.0.0.1 PORT=3333 NODE_ENV=development -APP_NAME=Ferdi-server +APP_NAME=Ferdium-server APP_URL=localhost CACHE_VIEWS=false @@ -16,7 +16,7 @@ DB_HOST=127.0.0.1 DB_PORT=3306 DB_USER=root DB_PASSWORD= -DB_DATABASE=ferdi +DB_DATABASE=ferdium DB_SSL=false PUID=1000 @@ -34,5 +34,5 @@ SMTP_PORT=2525 SMTP_HOST=127.0.0.1 MAIL_USERNAME=username MAIL_PASSWORD=password -MAIL_SENDER=noreply@getferdi.com +MAIL_SENDER=noreply@ferdium.org MAIL_SSL=true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0b4c0b..46bb4e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,12 @@ -# Contributing to ferdi-server +# Contributing to ferdium-server -:tada: First off, thanks for taking the time and your effort to make Ferdi better! :tada: +:tada: First off, thanks for taking the time and your effort to make Ferdium better! :tada: ## Table of contents -- [Contributing to ferdi-server](#contributing-to-ferdi-server) +- [Contributing to ferdium-server](#contributing-to-ferdium-server) - [Table of contents](#table-of-contents) - [Code of Conduct](#code-of-conduct) - [What should I know before I get started?](#what-should-i-know-before-i-get-started) @@ -26,15 +26,15 @@ ## Code of Conduct -This project and everyone participating in it is governed by the [Ferdi Code of Conduct](https://github.com/getferdi/ferdi/blob/develop/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [stefan@adlk.io](mailto:stefan@adlk.io). +This project and everyone participating in it is governed by the [Ferdium Code of Conduct](https://github.com/ferdium/ferdium-app/blob/develop/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [hello@ferdium.org](mailto:hello@ferdium.org). ## What should I know before I get started? -For the moment, Ferdi's development is a bit slow but all contributions are highly appreciated. [Check this issue for discussion](https://github.com/getferdi/ferdi/issues/956). +For the moment, Ferdium's development is just getting started but all contributions (code, testing, bug-logging, feature-suggestions) are highly appreciated. ## How Can I Contribute? -As a basic rule, before filing issues, feature requests or anything else. Take a look at the issues and check if this has not already been reported by another user. If so, engage in the already existing discussion. +As a basic rule, before filing issues, feature requests or anything else, please take a look at the issues and check if this has not already been reported by another user. If so, engage in the already existing discussion. ## Setting up your Development machine @@ -83,16 +83,16 @@ npm i -g windows-build-tools --vs2015 ### Clone repository with submodule ```bash -git clone https://github.com/getferdi/server.git -cd server -git submodule update --init --recursive +git clone https://github.com/ferdium/ferdium-server.git +cd ferdium-server +git submodule update --init --recursive --remote --rebase --force ``` It is important you execute the last command to get the required submodules (recipes). ### Install dependencies -- Run the following command to install all dependencies, and link sibling modules with ferdi-server. +- Run the following command to install all dependencies, and link sibling modules with ferdium-server. ```bash npm i diff --git a/LICENSE b/LICENSE index 1633187..d4e0e9d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Ferdi +Copyright (c) 2022 Ferdium Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5dc0b3d..0668955 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Server

- Build Status + Build Status Contributors @@ -15,7 +15,7 @@ ## Why use a custom server? -_Find answers to other frequently asked questions on [getferdi.com/faq](https://getferdi.com/faq/)._ +_Find answers to other frequently asked questions on [ferdium.org/faq](https://ferdium.org/faq/)._

Toggle answer @@ -30,7 +30,7 @@ A custom server allows you to manage the data of all registered users yourself a - [x] Workspace support - [x] Functioning service store - [x] User dashboard -- [x] Export/import data to other Ferdi-servers +- [x] Export/import data to other Ferdium-servers - [x] Password recovery - [x] Recipe update @@ -38,12 +38,12 @@ A custom server allows you to manage the data of all registered users yourself a
Setup with Docker -The easiest way to set up Ferdi-server on your server is with Docker. +The easiest way to set up Ferdium-server on your server is with Docker. The Docker image can be run as is, with the default SQLite database or you can modify your ENV variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). After setting up the docker container we recommend you set up an NGINX reverse proxy to access Ferdium-server outside of your home network and protect it with an SSL certificate. -**Warning**, please note that the use of the previous `config.txt` is now deprecated and a number of environmental variables have changed, specifically the default database name and location, the internal container port, and an additional `DATA_DIR` variable has been added. Make sure to pass the correct environmental variables to your container at runtime. If you are an existing Ferdi-server user, please see [the Ferdium docker documentation](./docker/README.md) for more information about migrating to the new image. +**Warning**, please note that the use of the previous `config.txt` is now deprecated and a number of environment variables have changed, specifically the default database name and location, the internal container port, and an additional `DATA_DIR` variable has been added. Make sure to pass the correct environment variables to your container at runtime. If you are an existing Ferdium-server user, please see [the Ferdium docker documentation](./docker/README.md) for more information about migrating to the new image. 1. Pull the Docker image @@ -56,7 +56,7 @@ After setting up the docker container we recommend you set up an NGINX reverse p docker create \ --name=ferdium-server \ -e NODE_ENV=development \ - -e APP_URL= \ + -e APP_URL= \ -e DB_CONNECTION= \ -e DB_HOST= \ -e DB_PORT= \ @@ -87,7 +87,7 @@ After setting up the docker container we recommend you set up an NGINX reverse p 3. Optionally, you can [set up Nginx as a reverse proxy](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04#set-up-nginx-as-a-reverse-proxy-server). -For more information on configuring the Docker image, please read [the Ferdi docker documentation](./docker/README.md). +For more information on configuring the Docker image, please read [the Ferdium docker documentation](./docker/README.md).
Manual setup @@ -112,20 +112,20 @@ For more information on configuring the Docker image, please read [the Ferdi doc
Configuration -franz-server's configuration is saved inside an `.env` file. Besides AdonisJS's settings, Ferdi-server has the following custom settings: +Ferdium-server's configuration is saved inside an `.env` file. Besides AdonisJS's settings, Ferdium-server has the following custom settings: - `IS_CREATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the [creation of custom recipes](#creating-and-using-custom-recipes) - `IS_REGISTRATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the creation of new user accounts - `IS_DASHBOARD_ENABLED` (`true` or `false`, default: `true`): Whether to enable the user dashboard -- `CONNECT_WITH_FRANZ` (`true` or `false`, default: `true`): Whether to enable connections to the Franz server. By enabling this option, Ferdi-server can: +- `CONNECT_WITH_FRANZ` (`true` or `false`, default: `true`): Whether to enable connections to the Franz server. By enabling this option, Ferdium-server can: - Show the full Franz recipe library instead of only custom recipes - Import Franz accounts
-Importing your Franz account +Importing your Franz/Ferdi account -Ferdium-server allows you to import your full Franz (or Ferdi) account, including all its settings. +Ferdium-server allows you to import your full Franz/Ferdi account, including all its settings. -To import your Franz/Ferdi account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz/Ferdi account details. Ferdium-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. +To import your Franz/Ferdi account, open `http://[YOUR FERDIUM-SERVER]/import` in your browser and login using your Franz/Ferdi account details. Ferdium-server will create a new user with the same credentials and copy your Franz/Ferdi settings, services and workspaces.
Transferring user data @@ -136,15 +136,16 @@ Please refer to Creating and using custom recipes Ferdium-server allows to extends the Franz/Ferdi recipe catalogue with custom Ferdium recipes. -For documentation on how to create a recipe, please visit [the official guide by Franz](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). +For documentation on how to create a recipe, please visit [the official guide](https://github.com/ferdium/ferdium-recipes/blob/master/docs/integration.md). -To add your recipe to Ferdium-server, open `http://[YOUR FERDI-SERVER]/new` in your browser. You can now define the following settings: +To add your recipe to Ferdium-server, open `http://[YOUR FERDIUM-SERVER]/new` in your browser. You can now define the following settings: - `Author`: Author who created the recipe - `Name`: Name for your new service. Can contain spaces and unicode characters - `Service ID`: Unique ID for this recipe. Does not contain spaces or special characters (e.g. `google-drive`) - `Link to SVG image`: Direct link to a 1024x1024 SVG image that is used as a logo inside the store. Please use jsDelivr when using a file uploaded to GitHub as raw.githubusercontent files won't load -- `Recipe files`: Recipe files that you created using the [Franz recipe creation guide](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). Please do *not* package your files beforehand - upload the raw files (you can drag and drop multiple files). Ferdi-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files. +- `Recipe files`: Recipe files that you created using the [recipe creation guide](https://github.com/ferdium/ferdium-recipes/blob/master/docs/integration.md). Please do _not_ package your files beforehand - upload the raw files (you can drag and drop multiple files). Ferdium-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files. +
Listing custom recipes @@ -165,10 +166,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - + + + +

nick

💻

Michał Kostewicz

💻

Cromefire_

💻

OMKAR AGRAWAL

💻

nick

💻

Michał Kostewicz

💻

Cromefire_

💻

OMKAR AGRAWAL

💻
diff --git a/app/Controllers/Http/DashboardController.js b/app/Controllers/Http/DashboardController.js index 84a88a9..e7c38c2 100644 --- a/app/Controllers/Http/DashboardController.js +++ b/app/Controllers/Http/DashboardController.js @@ -222,14 +222,14 @@ class DashboardController { try { file = JSON.parse(request.input('file')); } catch (e) { - session.flash({ type: 'danger', message: 'Invalid Ferdi account file' }); + session.flash({ type: 'danger', message: 'Invalid Ferdium account file' }); return response.redirect('back'); } if (!file || !file.services || !file.workspaces) { session.flash({ type: 'danger', - message: 'Invalid Ferdi account file (2)', + message: 'Invalid Ferdium account file (2)', }); return response.redirect('back'); } diff --git a/app/Controllers/Http/RecipeController.js b/app/Controllers/Http/RecipeController.js index 4fad74e..cbdddaf 100644 --- a/app/Controllers/Http/RecipeController.js +++ b/app/Controllers/Http/RecipeController.js @@ -136,7 +136,7 @@ class RecipeController { // Get results let results; - if (needle === 'ferdi:custom') { + if (needle === 'ferdium:custom') { const dbResults = (await Recipe.all()).toJSON(); results = dbResults.map((recipe) => ({ id: recipe.recipeId, diff --git a/app/Controllers/Http/StaticController.js b/app/Controllers/Http/StaticController.js index aad1059..abba249 100644 --- a/app/Controllers/Http/StaticController.js +++ b/app/Controllers/Http/StaticController.js @@ -31,8 +31,8 @@ class StaticController { isTodosEnabled: true, isTodosIncludedInCurrentPlan: true, defaultTrialPlan: 'franz-pro-yearly', - subscribeURL: 'https://getferdi.com', - planSelectionURL: 'https://getferdi.com', + subscribeURL: 'https://ferdium.org', + planSelectionURL: 'https://ferdium.org', hasInlineCheckout: true, isPlanSelectionEnabled: false, isTrialStatusBarEnabled: false, @@ -43,24 +43,24 @@ class StaticController { plans: { personal: { monthly: { - id: 'ferdi-free', + id: 'ferdium-free', price: 0, billed: 0, }, yearly: { - id: 'ferdi-completely-free', + id: 'ferdium-completely-free', price: 0, billed: 0, }, }, pro: { monthly: { - id: 'ferdi-still-free', + id: 'ferdium-still-free', price: 0, billed: 0, }, yearly: { - id: 'ferdi-forever-free', + id: 'ferdium-forever-free', price: 0, billed: 0, }, diff --git a/app/Controllers/Http/UserController.js b/app/Controllers/Http/UserController.js index 99336cb..aef7f01 100644 --- a/app/Controllers/Http/UserController.js +++ b/app/Controllers/Http/UserController.js @@ -10,11 +10,12 @@ const fetch = require('node-fetch'); const { v4: uuid } = require('uuid'); const crypto = require('crypto'); +// TODO: This whole controller needs to be changed such that it can support importing from both Franz and Ferdi const franzRequest = (route, method, auth) => new Promise((resolve, reject) => { const base = 'https://api.franzinfra.com/v1/'; const user = - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Ferdi/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; try { fetch(base + route, { @@ -247,7 +248,7 @@ class UserController { const base = 'https://api.franzinfra.com/v1/'; const userAgent = - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Ferdi/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.3.0-beta.1 Chrome/69.0.3497.128 Electron/4.2.4 Safari/537.36'; // Try to get an authentication token let token; @@ -377,7 +378,7 @@ class UserController { } return response.send( - 'Your account has been imported. You can now use your Franz account in Ferdi.', + 'Your account has been imported. You can now use your Franz/Ferdi account in Ferdium.', ); } } diff --git a/config/database.js b/config/database.js index de86a6c..5c51996 100644 --- a/config/database.js +++ b/config/database.js @@ -32,7 +32,7 @@ module.exports = { sqlite: { client: 'sqlite3', connection: { - filename: path.join(Env.get('DATA_DIR', 'data'), `${Env.get('DB_DATABASE', 'ferdi')}.sqlite`), + filename: path.join(Env.get('DATA_DIR', 'data'), `${Env.get('DB_DATABASE', 'ferdium')}.sqlite`), }, useNullAsDefault: true, debug: Env.get('DB_DEBUG', false), @@ -55,7 +55,7 @@ module.exports = { port: Env.get('DB_PORT', ''), user: Env.get('DB_USER', 'root'), password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'ferdi'), + database: Env.get('DB_DATABASE', 'ferdium'), }, debug: Env.get('DB_DEBUG', false), }, @@ -77,7 +77,7 @@ module.exports = { port: Env.get('DB_PORT', ''), user: Env.get('DB_USER', 'root'), password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'ferdi'), + database: Env.get('DB_DATABASE', 'ferdium'), ssl: Env.get('DB_CA_CERT') ? { rejectUnauthorized: false, ca: Env.get('DB_CA_CERT'), diff --git a/docker/README.md b/docker/README.md index fa36da9..fd5debb 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,10 +1,10 @@ -# Ferdi-server-docker -[Ferdi](https://github.com/getferdi/ferdi) is a hard-fork of [Franz](https://github.com/meetfranz/franz), adding awesome features and removing unwanted ones. Ferdi-server is an unofficial replacement of the Franz server for use with the Ferdi Client. +# Ferdium-server-docker +[Ferdium](https://github.com/ferdium/ferdium-app) is a hard-fork of [Ferdi](https://github.com/getferdi/ferdi), adding awesome features and removing unwanted ones. Ferdium-server is an unofficial replacement of the Franz/Ferdi server for use with the Ferdium Client. -This is a dockerized version of [Ferdi-server](https://github.com/getferdi/server) running on Alpine Linux and Node.js (v10.16.3). +This is a dockerized version of [Ferdium-server](https://github.com/ferdium/ferdium-server) running on Alpine Linux and Node.js (v10.16.3). -## Why use a custom Ferdi-server? -A custom Ferdi-server allows you to experience the full potential of the Ferdi Client. It allows you to use all Premium features (e.g. Workspaces and custom URL recipes) and [add your own recipes](#creating-and-using-custom-recipes). +## Why use a custom Ferdium-server? +A custom Ferdium-server allows you to experience the full potential of the Ferdium Client. It allows you to use all Premium features (e.g. Workspaces and custom URL recipes) for free and [add your own recipes](#creating-and-using-custom-recipes) that are monetized in Franz. ## Features - [x] User registration and login @@ -13,16 +13,16 @@ A custom Ferdi-server allows you to experience the full potential of the Ferdi C - [x] Functioning service store - [x] User dashboard - [x] Password recovery -- [x] Export/import data to other Ferdi-servers +- [x] Export/import data to other Ferdium-servers - [ ] Recipe update ## Installation & Setup Here are some example snippets to help you get started creating a container. -The docker can be run as is, with the default sqlite database, or you can modify your environment variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). After setting up the docker container you will need to create a reverse proxy to access Ferdi-server outside of your home network, using a webserver such as NGINX. +The docker can be run as is, with the default sqlite database, or you can modify your environment variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). After setting up the docker container you will need to create a reverse proxy to access Ferdium-server outside of your home network, using a webserver such as NGINX. -**Existing users, please note:** The latest updates to Ferdi-server and the Ferdi-server Docker image introduce changes to the default SQLite database name and location, as well as the internal container port. The new container port is `3333`. If you would like to keep your existing SQLite database, you will need to add the `DATA_DIR` variable and change it to `/app/database`, to match your existing data volume. You will also need to change the `DB_DATABASE` variable to `development` to match your existing database. Please see the parameters in the [Migration section](#migrating-from-an-existing-ferdi-server) below. +**Existing users, please note:** The latest updates to Ferdium-server and the Ferdium-server Docker image, introduce changes to the default SQLite database name and location, as well as the internal container port. The new container port is `3333`. If you would like to keep your existing SQLite database, you will need to add the `DATA_DIR` variable and change it to `/app/database`, to match your existing data volume. You will also need to change the `DB_DATABASE` variable to `development` to match your existing database. Please see the parameters in the [Migration section](#migrating-from-an-existing-ferdium-server) below. ### docker @@ -33,9 +33,9 @@ Pull the docker image: To create the docker container with the proper parameters: docker create \ - --name=ferdi-server \ + --name=ferdium-server \ -e NODE_ENV=development \ - -e APP_URL= \ + -e APP_URL= \ -e DB_CONNECTION= \ -e DB_HOST= \ -e DB_PORT= \ @@ -63,46 +63,46 @@ To create the docker container with the proper parameters: ### docker-compose - You can use the provided sample [docker-compose.yml](https://github.com/getferdi/server/tree/master/docker/docker-compose.yml) if you are happy with the default environmental variables. This will pull the latest image from Docker Hub or use a local copy of the image which you can build using the instructions provided in the [Building locally section](#building-locally). +You can use the provided sample [docker-compose.yml](https://github.com/ferdium/ferdium-server/tree/master/docker/docker-compose.yml) if you are happy with the default environment variables. This will pull the latest image from Docker Hub or use a local copy of the image, which you can build using the instructions provided in the [Building locally section](#building-locally). - To start the application, use `docker-compose -f docker/docker-compose.yml up -d`. +To start the application, use `docker-compose -f docker/docker-compose.yml up -d`. The server will be launched at [http://localhost:3333/](http://localhost:3333/) address. ## Configuration Container images are configured using parameters passed at runtime (such as those above). An explanaition of the default parameters is included below, but please see [the Docker documentation](https://docs.docker.com/get-started/overview/) for additional information. -If any environmental parameter is not passed to the container, its value will be taken from the `/config/config.txt` file. -**Warning, the use of `config.txt` is now deprecated. Please make sure to pass the correct environmental variables to your container at runtime. ** +If any environment parameter is not passed to the container, its value will be taken from the `/config/config.txt` file. +**Warning, the use of `config.txt` is now deprecated. Please make sure to pass the correct environment variables to your container at runtime. ** | Parameter | Function | | :----: | --- | | `-p :3333` | Will map the container's port 3333 to a port on the host, default is 3333. See the [Docker docs](https://docs.docker.com/config/containers/container-networking/) for more information about port mapping | -| `-e NODE_ENV=development` | for specifying Node environment, production or development, default is development **currently this should not be changed**. See the [Docker docs](https://docs.docker.com/) for more information on the use of environmental variables in [Command-line](https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only) and [Docker Compose](https://docs.docker.com/compose/environment-variables/) | -| `-e APP_URL=` | for specifying the URL of the Ferdi-server, including `http://` or `https://` as relevant. | -| `-e DB_CONNECTION=` | for specifying the database host, default is 127.0.0.1 | -| `-e DB_PORT=` | for specifying the database port, default is 3306 | -| `-e DB_USER=` | for specifying the database user, default is root | -| `-e DB_PASSWORD=` | for specifying the database password, default is password | -| `-e DB_DATABASE=` | for specifying the database name to be used, default is ferdi | +| `-e NODE_ENV=development` | for specifying Node environment, production or development, default is development **currently this should not be changed**. See the [Docker docs](https://docs.docker.com/) for more information on the use of environment variables in [Command-line](https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only) and [Docker Compose](https://docs.docker.com/compose/environment-variables/) | +| `-e APP_URL=` | for specifying the URL of the Ferdium-server, including `http://` or `https://` as relevant. | +| `-e DB_CONNECTION=` | for specifying the database host, default is `127.0.0.1` | +| `-e DB_PORT=` | for specifying the database port, default is `3306` | +| `-e DB_USER=` | for specifying the database user, default is `root` | +| `-e DB_PASSWORD=` | for specifying the database password, default is `password` | +| `-e DB_DATABASE=` | for specifying the database name to be used, default is `ferdium` | | `-e DB_SSL=false` | true only if your database is postgres and it is hosted online, on platforms like GCP, AWS, etc | -| `-e MAIL_CONNECTION=` | for specifying the mail sender to be used, default is smtp | -| `-e SMTP_HOST=` | for specifying the mail host to be used, default is 127.0.0.1 | -| `-e SMTP_PORT=` | for specifying the mail port to be used, default is 2525 | -| `-e MAIL_SSL=true/false` | for specifying SMTP mail security, default is false | -| `-e MAIL_USERNAME=` | for specifying your mail username to be used, default is username | -| `-e MAIL_PASSWORD=` | for specifying your mail password to be used, default is password | -| `-e MAIL_SENDER=:/data` | this will store Ferdi-server's data (its database, among other things) on the docker host for persistence. See the [Docker docs](https://docs.docker.com/storage/volumes/) for more information on the use of container volumes | -| `-v :/app/recipes` | this will store Ferdi-server's recipes on the docker host for persistence | - -By enabling the `CONNECT_WITH_FRANZ` option, Ferdi-server can: +| `-e MAIL_CONNECTION=` | for specifying the mail sender to be used, default is `smtp` | +| `-e SMTP_HOST=` | for specifying the mail host to be used, default is `127.0.0.1` | +| `-e SMTP_PORT=` | for specifying the mail port to be used, default is `2525` | +| `-e MAIL_SSL=true/false` | for specifying SMTP mail security, default is `false` | +| `-e MAIL_USERNAME=` | for specifying your mail username to be used, default is `username` | +| `-e MAIL_PASSWORD=` | for specifying your mail password to be used, default is `password` | +| `-e MAIL_SENDER=:/data` | this will store Ferdium-server's data (its database, among other things) on the docker host for persistence. See the [Docker docs](https://docs.docker.com/storage/volumes/) for more information on the use of container volumes | +| `-v :/app/recipes` | this will store Ferdium-server's recipes on the docker host for persistence | + +By enabling the `CONNECT_WITH_FRANZ` option, Ferdium-server can: - Show the full Franz recipe library instead of only custom recipes - Import Franz accounts @@ -127,45 +127,45 @@ To use a different email sender than the default, SMTP, enter the correct inform | Mailgun | MAILGUN_DOMAIN, MAILGUN_API_REGION, MAILGUN_API_KEY | | (**Deprecated**) Ethereal | A disposable account is created automatically if you choose this option. | -## Migrating from an existing Ferdi-server +## Migrating from an existing Ferdium-server -If you are an existing Ferdi-server user using the built-in `SQlite` database, you should include the following variables: +If you are an existing Ferdium-server user using the built-in `SQlite` database, you should include the following variables: | Parameter | Function | | :----: | --- | -| `-p 3333:3333` | existing Ferdi-server users will need to update their container port mappings from `80:3333` to `3333:3333` | -| `-e DB_PASSWORD=development` | existing Ferdi-server users who use the built-in sqlite database should use the database name `development` | -| `-e DATA_DIR=/app/database` | existing Ferdi-server users who use the built-in sqlite database should add this environmental variable to ensure data persistence | -| `-v =/app/databases` | existing Ferdi-server users who use the built-in sqlite database should use the volume name `/app/database` | +| `-p 3333:3333` | existing Ferdium-server users will need to update their container port mappings from `80:3333` to `3333:3333` | +| `-e DB_PASSWORD=development` | existing Ferdium-server users who use the built-in sqlite database should use the database name `development` | +| `-e DATA_DIR=/app/database` | existing Ferdium-server users who use the built-in sqlite database should add this environment variable to ensure data persistence | +| `-v =/app/databases` | existing Ferdium-server users who use the built-in sqlite database should use the volume name `/app/database` | -If you are an existing Ferdi-server user who uses an external database or different variables for the built-in `SQlite` database, you should updatae your parameterse acordingly. For example, if you aree using an exterenal MariaDB or MySql database your unique parameters might look like this: +If you are an existing Ferdium-server user who uses an external database or different variables for the built-in `SQlite` database, you should updatae your parameterse acordingly. For example, if you aree using an exterenal MariaDB or MySql database your unique parameters might look like this: | Parameter | Function | | :----: | --- | | `-e DB_CONNECTION=mysql` | for specifying the database being used | | `-e DB_HOST=192.168.10.1` | for specifying the database host machine IP | | `-e DB_PORT=3306` | for specifying the database port | -| `-e DB_USER=ferdi` | for specifying the database user | -| `-e DB_PASSWORD=ferdipw` | for specifying the database password| +| `-e DB_USER=ferdium` | for specifying the database user | +| `-e DB_PASSWORD=ferdiumpw` | for specifying the database password| | `-e DB_DATABASE=adonis` | for specifying the database to be used| -| `-v :/app/database` | this will strore Ferdi-server's database on the docker host for persistence | -| `-v :/app/recipes` | this will strore Ferdi-server's recipes on the docker host for persistence | +| `-v :/app/database` | this will store Ferdium-server's database on the docker host for persistence | +| `-v :/app/recipes` | this will store Ferdium-server's recipes on the docker host for persistence | -**In either case, please be sure to pass the correct variables to the new Ferdi-server container in order maintain access to your existing database.** +**In either case, please be sure to pass the correct variables to the new Ferdium-server container in order maintain access to your existing database.** ## NGINX config block -To access Ferdi-server from outside of your home network on a subdomain use this server block: +To access Ferdium-server from outside of your home network on a subdomain use this server block: ``` -# Ferdi-server +# Ferdium-server server { listen 443 ssl http2; - server_name ferdi.my.website; + server_name ferdium.my.website; # all ssl related config moved to ssl.conf include /config/nginx/ssl.conf; location / { - proxy_pass http://:3333; + proxy_pass http://:3333; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; @@ -174,11 +174,11 @@ server { } ``` -## Importing your Franz account +## Importing your Franz/Ferdi account -Ferdi-server allows you to import your full Franz account, including all its settings. +Ferdium-server allows you to import your full Franz account, including all its settings. -To import your Franz account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz account details. Ferdi-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. +To import your Franz account, open `http://[YOUR FERDIUM-SERVER]/import` in your browser and login using your Franz account details. Ferdium-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. ## Transferring user data @@ -186,48 +186,48 @@ Please refer to diff --git a/resources/views/dashboard/delete.edge b/resources/views/dashboard/delete.edge index 1395f7a..d058a73 100644 --- a/resources/views/dashboard/delete.edge +++ b/resources/views/dashboard/delete.edge @@ -16,7 +16,7 @@ @endif
-

Are you sure, that you want to delete your Ferdi account?

+

Are you sure, that you want to delete your Ferdium account?

This will permanently delete all your account settings, services and workspaces.

{{ csrfField() }} diff --git a/resources/views/dashboard/login.edge b/resources/views/dashboard/login.edge index ee354a4..23995ae 100644 --- a/resources/views/dashboard/login.edge +++ b/resources/views/dashboard/login.edge @@ -61,7 +61,7 @@
diff --git a/resources/views/dashboard/transfer.edge b/resources/views/dashboard/transfer.edge index 9412a8c..103381d 100644 --- a/resources/views/dashboard/transfer.edge +++ b/resources/views/dashboard/transfer.edge @@ -28,7 +28,7 @@

Import data

- +
diff --git a/resources/views/layouts/main.edge b/resources/views/layouts/main.edge index 00d9987..c611bc5 100644 --- a/resources/views/layouts/main.edge +++ b/resources/views/layouts/main.edge @@ -5,7 +5,7 @@ - ferdi-server + ferdium-server {{ style('css/vanilla') }} diff --git a/resources/views/layouts/v2.edge b/resources/views/layouts/v2.edge index 999be94..312ed67 100644 --- a/resources/views/layouts/v2.edge +++ b/resources/views/layouts/v2.edge @@ -16,8 +16,8 @@
- - Star + + Star
diff --git a/resources/views/others/import.edge b/resources/views/others/import.edge index 918c60b..7fb58de 100644 --- a/resources/views/others/import.edge +++ b/resources/views/others/import.edge @@ -5,10 +5,10 @@

- Import your Franz account + Import your Franz/Ferdi account

- Please login using your Franz account. We will create a new Ferdi account with the same credentials. + Please login using your Franz/Ferdi account. We will create a new Ferdium account with the same credentials.

@if(flashMessage('error')) @@ -54,7 +54,7 @@ Import account

- By importing your Franz account, you accept the terms of service and privacy + By importing your Franz/Ferdi account, you accept the terms of service and privacy policy

diff --git a/resources/views/others/index.edge b/resources/views/others/index.edge index ade5304..5cc5726 100644 --- a/resources/views/others/index.edge +++ b/resources/views/others/index.edge @@ -17,7 +17,7 @@
  1. - Logout of Ferdi, if you are currently logged in + Logout of Ferdium, if you are currently logged in
  2. Choose "Change Server" to get to the settings screen @@ -34,7 +34,7 @@ Go to account dashboard -

    Don't have Ferdi yet?

    +

    Don't have Ferdium yet?

diff --git a/resources/views/others/new.edge b/resources/views/others/new.edge index 96bd0ee..1bfd46f 100644 --- a/resources/views/others/new.edge +++ b/resources/views/others/new.edge @@ -2,8 +2,8 @@ @section('content')

Create a new recipe

-

Please create a recipe using the - official Franz guide, then publish it here.

+

Please create a recipe using the + official guide, then publish it here.



diff --git a/start/events.js b/start/events.js index 481ad98..a99afd5 100644 --- a/start/events.js +++ b/start/events.js @@ -5,7 +5,7 @@ const Env = use('Env'); Event.on('forgot::password', async ({ user, token }) => { const body = ` Hello ${user.username}, -we received a request to reset your Ferdi account password. +we received a request to reset your Ferdium account password. Use the link below to reset your password. If you didn't requested that your password be reset, please ignore this message. ${Env.get('APP_URL')}/user/reset?token=${encodeURIComponent(token)} @@ -15,7 +15,7 @@ This message was sent automatically. Please do not reply. console.log('Sending message', body); try { await Mail.raw(body, (message) => { - message.subject('[Ferdi] Reset your password'); + message.subject('[Ferdium] Reset your password'); message.from(Env.get('MAIL_SENDER')); message.to(user.email); }); diff --git a/start/routes.js b/start/routes.js index f269dc8..64a7605 100644 --- a/start/routes.js +++ b/start/routes.js @@ -114,7 +114,7 @@ Route.get('new', ({ response, view }) => { return view.render('others.new'); }); -// Franz account import +// Franz/Ferdi account import Route.post('import', 'UserController.import'); Route.get('import', ({ view }) => view.render('others.import')); -- cgit v1.2.3-54-g00ecf