aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.env.example3
-rw-r--r--.github/workflows/build-and-publish.yml3
-rw-r--r--README.md4
-rw-r--r--config/mail.js8
-rw-r--r--docker/README.md8
-rw-r--r--docker/docker-compose.yml4
-rw-r--r--start/events.js4
7 files changed, 17 insertions, 17 deletions
diff --git a/.env.example b/.env.example
index 0c470e9..36ae547 100644
--- a/.env.example
+++ b/.env.example
@@ -3,8 +3,7 @@ PORT=3333
3NODE_ENV=development 3NODE_ENV=development
4 4
5APP_NAME=Ferdi-server 5APP_NAME=Ferdi-server
6APP_URL=http://${HOST}:${PORT} 6APP_URL=localhost
7EXTERNAL_DOMAIN=ferdi.domain.tld
8 7
9CACHE_VIEWS=false 8CACHE_VIEWS=false
10 9
diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml
index d40056a..cfc7543 100644
--- a/.github/workflows/build-and-publish.yml
+++ b/.github/workflows/build-and-publish.yml
@@ -21,13 +21,14 @@ jobs:
21 with: 21 with:
22 images: | 22 images: |
23 getferdi/ferdi-server 23 getferdi/ferdi-server
24# ghcr.io/getferdi/ferdi-server 24 ghcr.io/getferdi/ferdi-server
25 tags: | 25 tags: |
26 type=ref,event=branch 26 type=ref,event=branch
27 type=ref,event=pr 27 type=ref,event=pr
28 type=semver,pattern={{version}} 28 type=semver,pattern={{version}}
29 type=semver,pattern={{major}}.{{minor}} 29 type=semver,pattern={{major}}.{{minor}}
30 type=semver,pattern={{major}} 30 type=semver,pattern={{major}}
31 labels: org.opencontainers.image.title=Ferdi-server
31 32
32 - name: Set up QEMU 33 - name: Set up QEMU
33 uses: docker/setup-qemu-action@v1 34 uses: docker/setup-qemu-action@v1
diff --git a/README.md b/README.md
index 853d019..a6a16c8 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ After setting up the docker container we recommend you set up an NGINX reverse p
54 docker create \ 54 docker create \
55 --name=ferdi-server \ 55 --name=ferdi-server \
56 -e NODE_ENV=development \ 56 -e NODE_ENV=development \
57 -e EXTERNAL_DOMAIN=<ferdi-serverdomain> \ 57 -e APP_URL=<ferdi-server-url> \
58 -e DB_CONNECTION=<database> \ 58 -e DB_CONNECTION=<database> \
59 -e DB_HOST=<yourdbhost> \ 59 -e DB_HOST=<yourdbhost> \
60 -e DB_PORT=<yourdbport> \ 60 -e DB_PORT=<yourdbport> \
@@ -63,7 +63,7 @@ After setting up the docker container we recommend you set up an NGINX reverse p
63 -e DB_DATABASE=<yourdbdatabase> \ 63 -e DB_DATABASE=<yourdbdatabase> \
64 -e DB_SSL=false \ 64 -e DB_SSL=false \
65 -e MAIL_CONNECTION=smtp \ 65 -e MAIL_CONNECTION=smtp \
66 -e SMPT_HOST=<smtpmailserver> \ 66 -e SMTP_HOST=<smtpmailserver> \
67 -e SMTP_PORT=<smtpport> \ 67 -e SMTP_PORT=<smtpport> \
68 -e MAIL_SSL=true/false \ 68 -e MAIL_SSL=true/false \
69 -e MAIL_USERNAME=<yourmailusername> \ 69 -e MAIL_USERNAME=<yourmailusername> \
diff --git a/config/mail.js b/config/mail.js
index 1f11a8e..2518772 100644
--- a/config/mail.js
+++ b/config/mail.js
@@ -25,10 +25,10 @@ module.exports = {
25 smtp: { 25 smtp: {
26 driver: 'smtp', 26 driver: 'smtp',
27 pool: true, 27 pool: true,
28 name: Env.get('EXTERNAL_DOMAIN'), 28 name: Env.get('APP_URL'),
29 port: Env.get('SMTP_PORT', 2525), 29 port: Env.get('SMTP_PORT', '2525'),
30 host: Env.get('SMTP_HOST'), 30 host: Env.get('SMTP_HOST', 'localhost'),
31 secure: JSON.parse(Env.get('MAIL_SSL', Env.get('SSL', false))), 31 secure: JSON.parse(Env.get('MAIL_SSL', 'false')),
32 authMethod: 'LOGIN', 32 authMethod: 'LOGIN',
33 auth: { 33 auth: {
34 user: Env.get('MAIL_USERNAME'), 34 user: Env.get('MAIL_USERNAME'),
diff --git a/docker/README.md b/docker/README.md
index 98877f4..3cb49be 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -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 APP_URL=<ferdi-server-url> \
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> \
@@ -44,7 +44,7 @@ To create the docker container with the proper parameters:
44 -e DB_DATABASE=<yourdbdatabase> \ 44 -e DB_DATABASE=<yourdbdatabase> \
45 -e DB_SSL=false \ 45 -e DB_SSL=false \
46 -e MAIL_CONNECTION=smtp \ 46 -e MAIL_CONNECTION=smtp \
47 -e SMPT_HOST=<smtpmailserver> \ 47 -e SMTP_HOST=<smtpmailserver> \
48 -e SMTP_PORT=<smtpport> \ 48 -e SMTP_PORT=<smtpport> \
49 -e MAIL_SSL=true/false \ 49 -e MAIL_SSL=true/false \
50 -e MAIL_USERNAME=<yourmailusername> \ 50 -e MAIL_USERNAME=<yourmailusername> \
@@ -79,7 +79,7 @@ Container images are configured using parameters passed at runtime (such as thos
79| :----: | --- | 79| :----: | --- |
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 | 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| `-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/) | 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 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/) |
82| `-e EXTERNAL_DOMAIN=<ferdi-serverdomain>` | for specifying the external domain address of the Ferdi-server | 82| `-e APP_URL=<ferdi-server-url>` | for specifying the URL of the Ferdi-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 | 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_HOST=<yourdbhost>` | for specifying the database host, default is 127.0.0.1 | 84| `-e DB_HOST=<yourdbhost>` | for specifying the database host, default is 127.0.0.1 |
85| `-e DB_PORT=<yourdbport>` | for specifying the database port, default is 3306 | 85| `-e DB_PORT=<yourdbport>` | for specifying the database port, default is 3306 |
@@ -88,7 +88,7 @@ Container images are configured using parameters passed at runtime (such as thos
88| `-e DB_DATABASE=<databasename>` | for specifying the database name to be used, default is ferdi | 88| `-e DB_DATABASE=<databasename>` | for specifying the database name to be used, default is ferdi |
89| `-e DB_SSL=false` | true only if your database is postgres and it is hosted online, on platforms like GCP, AWS, etc | 89| `-e DB_SSL=false` | true only if your database is postgres and it is hosted online, on platforms like GCP, AWS, etc |
90| `-e MAIL_CONNECTION=<mailsender>` | for specifying the mail sender to be used, default is smtp | 90| `-e MAIL_CONNECTION=<mailsender>` | for specifying the mail sender to be used, default is smtp |
91| `-e SMPT_HOST=<smtpmailserver>` | for specifying the mail host to be used, default is 127.0.0.1 | 91| `-e SMTP_HOST=<smtpmailserver>` | for specifying the mail host to be used, default is 127.0.0.1 |
92| `-e SMTP_PORT=<smtpport>` | for specifying the mail port to be used, default is 2525 | 92| `-e SMTP_PORT=<smtpport>` | for specifying the mail port to be used, default is 2525 |
93| `-e MAIL_SSL=true/false` | for specifying SMTP mail security, default is false | 93| `-e MAIL_SSL=true/false` | for specifying SMTP mail security, default is false |
94| `-e MAIL_USERNAME=<yourmailusername>` | for specifying your mail username to be used, default is username | 94| `-e MAIL_USERNAME=<yourmailusername>` | for specifying your mail username to be used, default is username |
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index bd66ba2..4902331 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -5,7 +5,7 @@ services:
5 container_name: ferdi-server 5 container_name: ferdi-server
6 environment: 6 environment:
7 - NODE_ENV=development 7 - NODE_ENV=development
8 - EXTERNAL_DOMAIN=localhost 8 - APP_URL=localhost
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
@@ -14,7 +14,7 @@ services:
14 - DB_DATABASE=ferdi 14 - DB_DATABASE=ferdi
15 - DB_SSL=false 15 - DB_SSL=false
16 - MAIL_CONNECTION=smtp 16 - MAIL_CONNECTION=smtp
17 - SMPT_HOST=127.0.0.1 17 - SMTP_HOST=127.0.0.1
18 - SMTP_PORT=2525 18 - SMTP_PORT=2525
19 - MAIL_SSL=false 19 - MAIL_SSL=false
20 - MAIL_USERNAME=username 20 - MAIL_USERNAME=username
diff --git a/start/events.js b/start/events.js
index c4076cc..481ad98 100644
--- a/start/events.js
+++ b/start/events.js
@@ -5,8 +5,8 @@ const Env = use('Env');
5Event.on('forgot::password', async ({ user, token }) => { 5Event.on('forgot::password', async ({ user, token }) => {
6 const body = ` 6 const body = `
7Hello ${user.username}, 7Hello ${user.username},
8we just recieved a request to reset your password of your Ferdi account. 8we received a request to reset your Ferdi account password.
9Use the link below to reset your password. If you havn't requested this, please ignore this message. 9Use the link below to reset your password. If you didn't requested that your password be reset, please ignore this message.
10 10
11${Env.get('APP_URL')}/user/reset?token=${encodeURIComponent(token)} 11${Env.get('APP_URL')}/user/reset?token=${encodeURIComponent(token)}
12 12