aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Fabian H <fabolhak@users.noreply.github.com>2024-02-15 10:50:35 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-15 09:50:35 +0000
commit8edfaa59deba5b3d5d4d877571928931433ed453 (patch)
treed6d2e1a227532cc242426e5637d05e0d95d0335d
parentupgrade recipes submodule (diff)
downloadferdium-server-8edfaa59deba5b3d5d4d877571928931433ed453.tar.gz
ferdium-server-8edfaa59deba5b3d5d4d877571928931433ed453.tar.zst
ferdium-server-8edfaa59deba5b3d5d4d877571928931433ed453.zip
Fix various smaller issues in docker compose example and docker Readme.md (#97)
Co-authored-by: fabolhak <dev-faha@t-online.de>
-rw-r--r--docker/README.md18
-rw-r--r--docker/docker-compose.yml7
2 files changed, 14 insertions, 11 deletions
diff --git a/docker/README.md b/docker/README.md
index 0051ac5..2e3d77f 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -34,7 +34,7 @@ To create the docker container with the proper parameters:
34 34
35 docker create \ 35 docker create \
36 --name=ferdium-server \ 36 --name=ferdium-server \
37 -e NODE_ENV=development \ 37 -e NODE_ENV=production \
38 -e APP_URL=<ferdium-server-url> \ 38 -e APP_URL=<ferdium-server-url> \
39 -e DB_CONNECTION=<database> \ 39 -e DB_CONNECTION=<database> \
40 -e DB_HOST=<yourdbhost> \ 40 -e DB_HOST=<yourdbhost> \
@@ -55,9 +55,10 @@ To create the docker container with the proper parameters:
55 -e IS_REGISTRATION_ENABLED=true \ 55 -e IS_REGISTRATION_ENABLED=true \
56 -e CONNECT_WITH_FRANZ=true \ 56 -e CONNECT_WITH_FRANZ=true \
57 -e DATA_DIR=/data \ 57 -e DATA_DIR=/data \
58 -e JWT_USE_PEM=true \
58 -p <port>:3333 \ 59 -p <port>:3333 \
59 -v <path to data>:/data \ 60 -v <path to data>:/data \
60 -v <path to recipes>:/app/recipes \ 61 -v <path to recipes>:/app/build/recipes \
61 --restart unless-stopped \ 62 --restart unless-stopped \
62 ferdium/ferdium-server:latest 63 ferdium/ferdium-server:latest
63 64
@@ -70,7 +71,7 @@ The server will be launched at [http://localhost:3333/](http://localhost:3333/)
70 71
71## Configuration 72## Configuration
72 73
73Container 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. 74Container images are configured using parameters passed at runtime (such as those above). An explanation of the default parameters is included below, but please see [the Docker documentation](https://docs.docker.com/get-started/overview/) for additional information.
74 75
75<strike>If any environment parameter is not passed to the container, its value will be taken from the `/config/config.txt` file.</strike> 76<strike>If any environment 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 environment variables to your container at runtime. ** 77**Warning, the use of `config.txt` is now deprecated. Please make sure to pass the correct environment variables to your container at runtime. **
@@ -78,7 +79,7 @@ Container images are configured using parameters passed at runtime (such as thos
78| Parameter | Function | 79| Parameter | Function |
79| :----: | --- | 80| :----: | --- |
80| `-p <port>: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 | 81| `-p <port>: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 |
81| `-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/) | 82| `-e NODE_ENV=production` | for specifying Node environment: `production` (recommended) or `development` |
82| `-e APP_URL=<ferdium-server-url>` | for specifying the URL of the Ferdium-server, including `http://` or `https://` as relevant. | 83| `-e APP_URL=<ferdium-server-url>` | for specifying the URL of the Ferdium-server, including `http://` or `https://` as relevant. |
83| `-e DB_CONNECTION=<databasedriver` | for specifying the database being used, default is `sqlite`, see [below](#supported-databases-and-drivers) for other options | 84| `-e DB_CONNECTION=<databasedriver` | for specifying the database being used, default is `sqlite`, see [below](#supported-databases-and-drivers) for other options |
84| `-e DB_HOST=<yourdbhost>` | for specifying the database host, default is `127.0.0.1` | 85| `-e DB_HOST=<yourdbhost>` | for specifying the database host, default is `127.0.0.1` |
@@ -99,8 +100,9 @@ Container images are configured using parameters passed at runtime (such as thos
99| `-e IS_REGISTRATION_ENABLED=true` | for specifying whether to allow user registration, default is `true` | 100| `-e IS_REGISTRATION_ENABLED=true` | for specifying whether to allow user registration, default is `true` |
100| `-e CONNECT_WITH_FRANZ=true` | for specifying whether to enable connections to the Franz server, default is `true` | 101| `-e CONNECT_WITH_FRANZ=true` | for specifying whether to enable connections to the Franz server, default is `true` |
101| `-e DATA_DIR=/data` | for specifying the SQLite database folder, default is `/data` | 102| `-e DATA_DIR=/data` | for specifying the SQLite database folder, default is `/data` |
102| `-v <path to data on host>:/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 | 103| `-e JWT_USE_PEM=true` | create JWT public/private keys if `true` |
103| `-v <path to recipes on host>:/app/recipes` | this will store Ferdium-server's recipes on the docker host for persistence | 104| `-v <path to data on host>:/data` | this will store Ferdium-server's data (its database, among other things) on the docker host for persistence |
105| `-v <path to recipes on host>:/app/build/recipes` | this will store Ferdium-server's recipes on the docker host for persistence |
104 106
105By enabling the `CONNECT_WITH_FRANZ` option, Ferdium-server can: 107By enabling the `CONNECT_WITH_FRANZ` option, Ferdium-server can:
106 - Show the full Franz recipe library instead of only custom recipes 108 - Show the full Franz recipe library instead of only custom recipes
@@ -137,7 +139,7 @@ If you are an existing Ferdium-server user using the built-in `SQlite` database,
137| `-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 | 139| `-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 |
138| `-v <path to data on host>=/app/databases` | existing Ferdium-server users who use the built-in sqlite database should use the volume name `/app/database` | 140| `-v <path to data on host>=/app/databases` | existing Ferdium-server users who use the built-in sqlite database should use the volume name `/app/database` |
139 141
140If 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: 142If you are an existing Ferdium-server user who uses an external database or different variables for the built-in `SQlite` database, you should update your parameters accordingly. For example, if you are using an external MariaDB or MySql database your unique parameters might look like this:
141| Parameter | Function | 143| Parameter | Function |
142| :----: | --- | 144| :----: | --- |
143| `-e DB_CONNECTION=mysql` | for specifying the database being used | 145| `-e DB_CONNECTION=mysql` | for specifying the database being used |
@@ -147,7 +149,7 @@ If you are an existing Ferdium-server user who uses an external database or diff
147| `-e DB_PASSWORD=ferdiumpw` | for specifying the database password| 149| `-e DB_PASSWORD=ferdiumpw` | for specifying the database password|
148| `-e DB_DATABASE=adonis` | for specifying the database to be used| 150| `-e DB_DATABASE=adonis` | for specifying the database to be used|
149| `-v <path to database>:/app/database` | this will store Ferdium-server's database on the docker host for persistence | 151| `-v <path to database>:/app/database` | this will store Ferdium-server's database on the docker host for persistence |
150| `-v <path to recipes>:/app/recipes` | this will store Ferdium-server's recipes on the docker host for persistence | 152| `-v <path to recipes>:/app/build/recipes` | this will store Ferdium-server's recipes on the docker host for persistence |
151 153
152**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.** 154**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.**
153 155
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index cdf8f88..c6dc09c 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -1,11 +1,11 @@
1version: "2" 1version: "2"
2services: 2services:
3 ferdium-server: 3 ferdium-server:
4 image: ferdium-server 4 image: ferdium/ferdium-server:latest
5 container_name: ferdium-server 5 container_name: ferdium-server
6 environment: 6 environment:
7 - NODE_ENV=development 7 - NODE_ENV=production
8 - APP_URL=localhost 8 - APP_URL=<ferdium-server-url>
9 - DB_CONNECTION=sqlite 9 - DB_CONNECTION=sqlite
10 - DB_HOST=127.0.0.1 10 - DB_HOST=127.0.0.1
11 - DB_PORT=3306 11 - DB_PORT=3306
@@ -34,3 +34,4 @@ services:
34 restart: unless-stopped 34 restart: unless-stopped
35volumes: 35volumes:
36 ferdium-recipes-vol: 36 ferdium-recipes-vol:
37 ferdium-database-vol: