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) --- docker/README.md | 144 +++++++++++++++++++++++----------------------- docker/docker-compose.yml | 16 +++--- docker/entrypoint.sh | 26 +++++---- 3 files changed, 94 insertions(+), 92 deletions(-) (limited to 'docker') 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