diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2021-10-30 10:10:36 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2021-10-30 10:10:36 +0530 |
commit | 4fd78e0deddcb51a0b4e07c64d2013fe545179a5 (patch) | |
tree | 925c65bd3578c4027c1a2346b5060f4d02352949 | |
parent | Lock Docker base image to 14.17 as expected by the server code. (diff) | |
download | ferdium-server-4fd78e0deddcb51a0b4e07c64d2013fe545179a5.tar.gz ferdium-server-4fd78e0deddcb51a0b4e07c64d2013fe545179a5.tar.zst ferdium-server-4fd78e0deddcb51a0b4e07c64d2013fe545179a5.zip |
Fix some more documentation
-rw-r--r-- | CONTRIBUTING.md | 12 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | docker/README.md | 50 |
3 files changed, 32 insertions, 34 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 440cc19..1c326b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
@@ -116,9 +116,9 @@ mkdir -p data | |||
116 | 116 | ||
117 | - Run the database migrations with | 117 | - Run the database migrations with |
118 | 118 | ||
119 | ```bash | 119 | ```bash |
120 | node ace migration:refresh | 120 | node ace migration:refresh |
121 | ``` | 121 | ``` |
122 | 122 | ||
123 | - To get the full functionality, you will need to have an SMTP server running for local development. | 123 | - To get the full functionality, you will need to have an SMTP server running for local development. |
124 | 124 | ||
@@ -132,9 +132,9 @@ cd recipes && npm i && npm run package | |||
132 | 132 | ||
133 | ### Start development app | 133 | ### Start development app |
134 | 134 | ||
135 | ```bash | 135 | ```bash |
136 | npm start --dev | 136 | npm start --dev |
137 | ``` | 137 | ``` |
138 | 138 | ||
139 | ### Styleguide | 139 | ### Styleguide |
140 | 140 | ||
@@ -6,7 +6,7 @@ | |||
6 | Official Server software for the [Ferdi Messaging Browser](https://getferdi.com) | 6 | Official Server software for the [Ferdi Messaging Browser](https://getferdi.com) |
7 | 7 | ||
8 | - [Ferdi-server](#ferdi-server) | 8 | - [Ferdi-server](#ferdi-server) |
9 | - [Why use a custom Ferdi server?](#why-use-a-custom-ferdi-server) | 9 | - [Why use a custom Ferdi-server?](#why-use-a-custom-ferdi-server) |
10 | - [Features](#features) | 10 | - [Features](#features) |
11 | - [Setup](#setup) | 11 | - [Setup](#setup) |
12 | - [with Docker](#with-docker) | 12 | - [with Docker](#with-docker) |
@@ -89,7 +89,7 @@ For more information on configuring the Docker image, please read [the Ferdi doc | |||
89 | 89 | ||
90 | ### Manual setup | 90 | ### Manual setup |
91 | 91 | ||
92 | 1. Clone this repository | 92 | 1. Clone repository with submodule |
93 | 2. Install the [AdonisJS CLI](https://adonisjs.com/) | 93 | 2. Install the [AdonisJS CLI](https://adonisjs.com/) |
94 | 3. Copy `.env.example` to `.env` and edit the [configuration](#configuration) to your needs | 94 | 3. Copy `.env.example` to `.env` and edit the [configuration](#configuration) to your needs |
95 | 4. Have env DB_SSL=true only if your database is postgres and it is hosted online on platforms like GCP, AWS, etc | 95 | 4. Have env DB_SSL=true only if your database is postgres and it is hosted online on platforms like GCP, AWS, etc |
diff --git a/docker/README.md b/docker/README.md index 33e78c0..7581bef 100644 --- a/docker/README.md +++ b/docker/README.md | |||
@@ -1,5 +1,5 @@ | |||
1 | # Ferdi-server-docker | 1 | # Ferdi-server-docker |
2 | [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. | 2 | [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. |
3 | 3 | ||
4 | This is a dockerized version of [Ferdi-server](https://github.com/getferdi/server) running on Alpine Linux and Node.js (v10.16.3). | 4 | This is a dockerized version of [Ferdi-server](https://github.com/getferdi/server) running on Alpine Linux and Node.js (v10.16.3). |
5 | 5 | ||
@@ -35,7 +35,7 @@ To create the docker container with the proper parameters: | |||
35 | docker create \ | 35 | docker create \ |
36 | --name=ferdi-server \ | 36 | --name=ferdi-server \ |
37 | -e NODE_ENV=development \ | 37 | -e NODE_ENV=development \ |
38 | -e EXTERNAL_DOMAIN=<ferdi-serverdomain> \ | 38 | -e EXTERNAL_DOMAIN=<ferdi-serverdomain> \ |
39 | -e DB_CONNECTION=<database> \ | 39 | -e DB_CONNECTION=<database> \ |
40 | -e DB_HOST=<yourdbhost> \ | 40 | -e DB_HOST=<yourdbhost> \ |
41 | -e DB_PORT=<yourdbport> \ | 41 | -e DB_PORT=<yourdbport> \ |
@@ -65,15 +65,15 @@ To create the docker container with the proper parameters: | |||
65 | 65 | ||
66 | 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). | 66 | 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). |
67 | 67 | ||
68 | To start the application, use `docker-compose up -d`. | 68 | To start the application, use `docker-compose -f docker/docker-compose.yml up -d`. |
69 | The server will be launched at [http://localhost:3333/](http://localhost:3333/) address. | 69 | The server will be launched at [http://localhost:3333/](http://localhost:3333/) address. |
70 | 70 | ||
71 | ## Configuration | 71 | ## Configuration |
72 | 72 | ||
73 | 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. | 73 | 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. |
74 | 74 | ||
75 | <strike>If any environmental parameter is not passed to the container, its value will be taken from the `/config/config.txt` file.</strike> | 75 | <strike>If any environmental parameter is not passed to the container, its value will be taken from the `/config/config.txt` file.</strike> |
76 | **Warning, the use of `config.txt` is now deprecated. Please make sure to pass the correct environmental variables to your container at runtime. ** | 76 | **Warning, the use of `config.txt` is now deprecated. Please make sure to pass the correct environmental variables to your container at runtime. ** |
77 | 77 | ||
78 | | Parameter | Function | | 78 | | Parameter | Function | |
79 | | :----: | --- | | 79 | | :----: | --- | |
@@ -108,7 +108,7 @@ By enabling the `CONNECT_WITH_FRANZ` option, Ferdi-server can: | |||
108 | 108 | ||
109 | ## Supported databases and drivers | 109 | ## Supported databases and drivers |
110 | 110 | ||
111 | To use a different database than the default, SQLite3, enter the driver code below in your ENV configuration. | 111 | To use a different database than the default, SQLite3, enter the driver code below in your ENV configuration. |
112 | 112 | ||
113 | | Database | Driver | | 113 | | Database | Driver | |
114 | | :----: | --- | | 114 | | :----: | --- | |
@@ -150,7 +150,7 @@ If you are an existing Ferdi-server user who usees an external database or diffe | |||
150 | | `-v <path to recipes>:/app/recipes` | this will strore Ferdi-server's recipes on the docker host for persistence | | 150 | | `-v <path to recipes>:/app/recipes` | this will strore Ferdi-server's recipes on the docker host for persistence | |
151 | 151 | ||
152 | **In eithr case, pleasee be sure to pass the correct variables to the new Ferdi-server container in order maintain access to your existing database.** | 152 | **In eithr case, pleasee be sure to pass the correct variables to the new Ferdi-server container in order maintain access to your existing database.** |
153 | 153 | ||
154 | ## NGINX config block | 154 | ## NGINX config block |
155 | 155 | ||
156 | To access Ferdi-server from outside of your home network on a subdomain use this server block: | 156 | To access Ferdi-server from outside of your home network on a subdomain use this server block: |
@@ -158,19 +158,19 @@ To access Ferdi-server from outside of your home network on a subdomain use this | |||
158 | ``` | 158 | ``` |
159 | # Ferdi-server | 159 | # Ferdi-server |
160 | server { | 160 | server { |
161 | listen 443 ssl http2; | 161 | listen 443 ssl http2; |
162 | server_name ferdi.my.website; | 162 | server_name ferdi.my.website; |
163 | 163 | ||
164 | # all ssl related config moved to ssl.conf | 164 | # all ssl related config moved to ssl.conf |
165 | include /config/nginx/ssl.conf; | 165 | include /config/nginx/ssl.conf; |
166 | 166 | ||
167 | location / { | 167 | location / { |
168 | proxy_pass http://<Ferdi-IP>:3333; | 168 | proxy_pass http://<Ferdi-IP>:3333; |
169 | proxy_set_header X-Real-IP $remote_addr; | 169 | proxy_set_header X-Real-IP $remote_addr; |
170 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 170 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
171 | proxy_set_header Host $host; | 171 | proxy_set_header Host $host; |
172 | proxy_set_header X-Forwarded-Proto $scheme; | 172 | proxy_set_header X-Forwarded-Proto $scheme; |
173 | } | 173 | } |
174 | } | 174 | } |
175 | ``` | 175 | ``` |
176 | 176 | ||
@@ -217,15 +217,13 @@ Below are the instructions for updating the container to get the most recent ver | |||
217 | * Delete the container: `docker rm ferdi-server` | 217 | * Delete the container: `docker rm ferdi-server` |
218 | * Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and ENV settings will be preserved) | 218 | * Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and ENV settings will be preserved) |
219 | * Start the new container: `docker start ferdi-server` | 219 | * Start the new container: `docker start ferdi-server` |
220 | * You can also remove the old dangling images: `docker image prune` | ||
221 | 220 | ||
222 | ### Via Docker Compose | 221 | ### Via Docker Compose |
223 | 222 | ||
224 | * Update all images: `docker-compose pull` | 223 | * Update all images: `docker-compose -f docker/docker-compose.yml pull` |
225 | * or update a single image: `docker-compose pull ferdi-server` | 224 | * or update a single image: `docker-compose -f docker/docker-compose.yml pull ferdi-server` |
226 | * Let compose update all containers as necessary: `docker-compose up -d` | 225 | * Let compose update all containers as necessary: `docker-compose -f docker/docker-compose.yml up -d` |
227 | * or update a single container: `docker-compose up -d ferdi-server` | 226 | * or update a single container: `docker-compose -f docker/docker-compose.yml up -d ferdi-server` |
228 | * You can also remove the old dangling images: `docker image prune` | ||
229 | 227 | ||
230 | ## Building locally | 228 | ## Building locally |
231 | 229 | ||