diff options
-rw-r--r-- | .dockerignore | 7 | ||||
-rw-r--r-- | .env.example | 2 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | docker/.gitignore | 4 | ||||
-rw-r--r-- | docker/README.md | 16 | ||||
-rwxr-xr-x | docker/entrypoint.sh | 16 |
7 files changed, 18 insertions, 34 deletions
diff --git a/.dockerignore b/.dockerignore index 7dad3a9..01c565b 100644 --- a/.dockerignore +++ b/.dockerignore | |||
@@ -7,10 +7,11 @@ | |||
7 | .gitattributes | 7 | .gitattributes |
8 | .cache | 8 | .cache |
9 | 9 | ||
10 | # ignore all markdown files (md) beside all README*.md other than README-secret.md | 10 | # ignore all markdown files |
11 | *.md | 11 | *.md |
12 | !README*.md | 12 | |
13 | README-secret.md | 13 | # Ignore database files |
14 | *.sqlite | ||
14 | 15 | ||
15 | # ignore other directories | 16 | # ignore other directories |
16 | docker | 17 | docker |
diff --git a/.env.example b/.env.example index b11a2cc..a11ce1f 100644 --- a/.env.example +++ b/.env.example | |||
@@ -10,7 +10,7 @@ CACHE_VIEWS=false | |||
10 | 10 | ||
11 | APP_KEY= | 11 | APP_KEY= |
12 | 12 | ||
13 | DATA_DIR=database | 13 | DATA_DIR= |
14 | 14 | ||
15 | DB_CONNECTION=sqlite | 15 | DB_CONNECTION=sqlite |
16 | DB_HOST=127.0.0.1 | 16 | DB_HOST=127.0.0.1 |
@@ -8,8 +8,7 @@ tmp | |||
8 | .env | 8 | .env |
9 | 9 | ||
10 | # The development sqlite file | 10 | # The development sqlite file |
11 | database/development.sqlite | 11 | *.sqlite |
12 | database/adonis.sqlite | ||
13 | 12 | ||
14 | # Uploaded recipes | 13 | # Uploaded recipes |
15 | recipes/ | 14 | recipes/ |
@@ -78,11 +78,11 @@ After setting up the docker container we recommend you to set up an NGINX revers | |||
78 | getferdi/ferdi-server | 78 | getferdi/ferdi-server |
79 | ``` | 79 | ``` |
80 | 80 | ||
81 | Alternatively, you can also use docker-compose v2 schemas. An example can be found in [./docker/docker-compose.yml](https://github.com/getferdi/server/tree/master/docker/docker-compose.yml) file. | 81 | Alternatively, you can also use docker-compose v2 schema. An example can be found [in the docker folder](./docker/docker-compose.yml). |
82 | 82 | ||
83 | 3. Optionally, you can now [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). | 83 | 3. Optionally, you can now [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). |
84 | 84 | ||
85 | For more information on configuring the Docker image, please read [./docker/README.md](https://github.com/getferdi/server/tree/master/docker/README.md). | 85 | For more information on configuring the Docker image, please read [the ferdi docker documentation](./docker/README.md). |
86 | 86 | ||
87 | ### Manual setup | 87 | ### Manual setup |
88 | 1. Clone this repository | 88 | 1. Clone this repository |
diff --git a/docker/.gitignore b/docker/.gitignore index b726524..552cd4a 100644 --- a/docker/.gitignore +++ b/docker/.gitignore | |||
@@ -4,10 +4,6 @@ node_modules | |||
4 | # Adonis directory for storing tmp files | 4 | # Adonis directory for storing tmp files |
5 | tmp | 5 | tmp |
6 | 6 | ||
7 | # The development sqlite file | ||
8 | database/development.sqlite | ||
9 | database/adonis.sqlite | ||
10 | |||
11 | # Uploaded recipes | 7 | # Uploaded recipes |
12 | recipes/ | 8 | recipes/ |
13 | 9 | ||
diff --git a/docker/README.md b/docker/README.md index 8518e15..1cea8ae 100644 --- a/docker/README.md +++ b/docker/README.md | |||
@@ -76,9 +76,11 @@ The server will be launched at [http://localhost:3333/](http://localhost:3333/) | |||
76 | 76 | ||
77 | ## Configuration | 77 | ## Configuration |
78 | 78 | ||
79 | Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 3333:80` would expose port `80` from inside the container to be accessible from the host's IP on port `3333` outside the container. | 79 | Container images are configured using parameters passed at runtime (such as those above). |
80 | After the first run, Ferdi-server's default configuration is saved inside the `config.txt` file inside your persistent data directory (`/config` in the container). | 80 | |
81 | If any environmental parameter is not passed to the container, its value will be taken from the `config.txt` file. You can also edit the `config.txt` file, but it is advisable to send the environment parameters to the container. | 81 | **Warning ,using `config.txt` will be deprecated in the future releases.** |
82 | |||
83 | If any of environmental parameters is not passed to the container, its value will be taken from the `/config/config.txt` file. **The previous functionality of saving container parameters in this file is now removed.** | ||
82 | 84 | ||
83 | | Parameter | Function | | 85 | | Parameter | Function | |
84 | | :----: | --- | | 86 | | :----: | --- | |
@@ -213,13 +215,5 @@ docker build \ | |||
213 | -t getferdi/ferdi-server:latest . | 215 | -t getferdi/ferdi-server:latest . |
214 | ``` | 216 | ``` |
215 | 217 | ||
216 | ## Versions | ||
217 | |||
218 | * **05.02.21:** - Repository moved to ferdi-server repository | ||
219 | * **19.01.21:** - Updated Mail SSL and DB SLL settings | ||
220 | * **20.09.20:** - Updated SMTP Mailer settings for password reset. | ||
221 | * **21.06.20:** - Rebase to Alpine 3.11 and added Mailer settings. | ||
222 | * **25.09.19:** - Initial Release. | ||
223 | |||
224 | ## License | 218 | ## License |
225 | Ferdi-server-docker and ferdi-server are licensed under the MIT License. | 219 | Ferdi-server-docker and ferdi-server are licensed under the MIT License. |
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 0bbcb9d..eac3fc8 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh | |||
@@ -14,17 +14,11 @@ Support our Open Collective at: | |||
14 | https://opencollective.com/getferdi/ | 14 | https://opencollective.com/getferdi/ |
15 | EOL | 15 | EOL |
16 | 16 | ||
17 | # if config.txt doesn't exist then create one with default values | 17 | # use config.txt or .env.example parameter values as default if they are not passed to container |
18 | if [ ! -f /config/config.txt ]; then | 18 | if [ -f /config/config.txt ]; then |
19 | cp /app/.env.example /config/config.txt | 19 | cp /config/config.txt /app/.env |
20 | fi | 20 | else |
21 | 21 | cp /app/.env.example /app/.env | |
22 | # use config.txt default values as .env file | ||
23 | if [ -f /app/.env ]; then | ||
24 | rm /app/.env | ||
25 | ln -s /config/config.txt /app/.env | ||
26 | elif [ ! -f /app/.env ]; then | ||
27 | ln -s /config/config.txt /app/.env | ||
28 | fi | 22 | fi |
29 | 23 | ||
30 | # Create APP key if needed | 24 | # Create APP key if needed |