aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile (renamed from docker/Dockerfile)1
-rw-r--r--README.md40
-rw-r--r--config/database.js2
-rw-r--r--docker/README.md1
-rw-r--r--docker/docker-compose.yml6
-rwxr-xr-xdocker/entrypoint.sh2
6 files changed, 7 insertions, 45 deletions
diff --git a/docker/Dockerfile b/Dockerfile
index 799bb0b..416c503 100644
--- a/docker/Dockerfile
+++ b/Dockerfile
@@ -18,7 +18,6 @@ ENV HOST=0.0.0.0 PORT=3333
18RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl"] 18RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl"]
19 19
20COPY --from=build /server-build /app 20COPY --from=build /server-build /app
21RUN ["touch", ".env"]
22RUN ["npm", "i", "-g", "@adonisjs/cli"] 21RUN ["npm", "i", "-g", "@adonisjs/cli"]
23 22
24HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health 23HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health
diff --git a/README.md b/README.md
index 9d1b02d..60de4fc 100644
--- a/README.md
+++ b/README.md
@@ -78,45 +78,7 @@ 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 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.
82
83 ```sh
84 ---
85 version: "2"
86 services:
87 ferdi-server:
88 image: getferdi/ferdi-server
89 container_name: ferdi-server
90 environment:
91 - NODE_ENV=development
92 - EXTERNAL_DOMAIN=<ferdi-serverdomain>
93 - DB_CONNECTION=<database>
94 - DB_HOST=<yourdbhost>
95 - DB_PORT=<yourdbPORT>
96 - DB_USER=<yourdbuser>
97 - DB_PASSWORD=<yourdbpass>
98 - DB_DATABASE=<yourdbdatabase>
99 - DB_SSL=true/false
100 - MAIL_CONNECTION=<mailsender>
101 - SMPT_HOST=<smtpmailserver>
102 - SMTP_PORT=<smtpport>
103 - MAIL_SSL=true/false
104 - MAIL_USERNAME=<yourmailusername>
105 - MAIL_PASSWORD=<yourmailpassword>
106 - MAIL_SENDER=<sendemailaddress>
107 - IS_CREATION_ENABLED=true/false
108 - IS_DASHBOARD_ENABLED=true/false
109 - IS_REGISTRATION_ENABLED=true/false
110 - CONNECT_WITH_FRANZ=true/false
111 volumes:
112 - <path to data>:/config
113 - <path to database>:/app/database
114 - <path to recipes>:/app/recipes
115 ports:
116 - <port>:80
117 restart: unless-stopped
118 ```
119 You can also use sample [./docker/docker-compose.yml](https://github.com/getferdi/server/tree/master/docker/docker-compose.yml) file.
120 82
1213. 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). 833. 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).
122 84
diff --git a/config/database.js b/config/database.js
index 6e08035..b7f57ad 100644
--- a/config/database.js
+++ b/config/database.js
@@ -31,7 +31,7 @@ module.exports = {
31 sqlite: { 31 sqlite: {
32 client: 'sqlite3', 32 client: 'sqlite3',
33 connection: { 33 connection: {
34 filename: `${Env.get('DATA_DIR', 'database')}/${Env.get('DB_DATABASE', 'development')}.sqlite`, 34 filename: Helpers.appRoot(`${Env.get('DATA_DIR', 'database')}/${Env.get('DB_DATABASE', 'development')}.sqlite`),
35 }, 35 },
36 useNullAsDefault: true, 36 useNullAsDefault: true,
37 debug: Env.get('DB_DEBUG', false), 37 debug: Env.get('DB_DEBUG', false),
diff --git a/docker/README.md b/docker/README.md
index 5daa9fc..995ca8a 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -101,6 +101,7 @@ After the first run, Ferdi-server's configuration is saved inside the `config.tx
101| `-e IS_DASHBOARD_ENABLED=true` | for specifying whether to enable the Ferdi-server dashboard, default is true | 101| `-e IS_DASHBOARD_ENABLED=true` | for specifying whether to enable the Ferdi-server dashboard, default is true |
102| `-e IS_REGISTRATION_ENABLED=true` | for specifying whether to allow user registration, default is true | 102| `-e IS_REGISTRATION_ENABLED=true` | for specifying whether to allow user registration, default is true |
103| `-e CONNECT_WITH_FRANZ=true` | for specifying whether to enable connections to the Franz server, default is true | 103| `-e CONNECT_WITH_FRANZ=true` | for specifying whether to enable connections to the Franz server, default is true |
104| `-e DATA_DIR=database` | for specifying sql-lite database folder, default is database |
104| `-v <path to data>:/config` | this will store persistent ENV data on the docker host | 105| `-v <path to data>:/config` | this will store persistent ENV data on the docker host |
105| `-v <path to database>:/app/database` | this will strore Ferdi-server's database on the docker host for persistence | 106| `-v <path to database>:/app/database` | this will strore Ferdi-server's database on the docker host for persistence |
106| `-v <path to recipes>:/app/recipes` | this will strore Ferdi-server's recipes on the docker host for persistence | 107| `-v <path to recipes>:/app/recipes` | this will strore Ferdi-server's recipes on the docker host for persistence |
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 364f9c3..8a8c795 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -24,10 +24,10 @@ services:
24 - IS_DASHBOARD_ENABLED=true 24 - IS_DASHBOARD_ENABLED=true
25 - IS_REGISTRATION_ENABLED=true 25 - IS_REGISTRATION_ENABLED=true
26 - CONNECT_WITH_FRANZ=false 26 - CONNECT_WITH_FRANZ=false
27 - DATA_DIR=/database 27 - DATA_DIR=my-database
28 volumes: 28 volumes:
29 - ferdi-config-vol:/config 29 - ferdi-config-vol:/config
30 - ferdi-database-vol:/database 30 - ferdi-database-vol:/app/my-database
31 - ferdi-recipes-vol:/app/recipes 31 - ferdi-recipes-vol:/app/recipes
32 ports: 32 ports:
33 - 3333:3333 33 - 3333:3333
@@ -35,4 +35,4 @@ services:
35volumes: 35volumes:
36 ferdi-config-vol: 36 ferdi-config-vol:
37 ferdi-database-vol: 37 ferdi-database-vol:
38 ferdi-recipes-vol: \ No newline at end of file 38 ferdi-recipes-vol:
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index cb0dd0f..667196e 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -33,7 +33,7 @@ elif [ -f "/config/FERDI_APP_KEY.txt" ];
33 echo "**** App Key set to $APP_KEY you can modify FERDI_APP_KEY.txt to update your key ****" 33 echo "**** App Key set to $APP_KEY you can modify FERDI_APP_KEY.txt to update your key ****"
34fi 34fi
35 35
36export APP_KEY=$APP_KEY 36export APP_KEY
37 37
38node ace migration:run --force 38node ace migration:run --force
39 39