diff options
author | thursday <xthursdayx@mailbox.org> | 2021-09-18 02:21:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 02:21:13 -0400 |
commit | 2b3b2ae202bc24c0db9f135b9d5865abefa16afb (patch) | |
tree | c952dbef8aba5db71a652759a32cbb8a35f4fac9 | |
parent | Bump tar from 4.4.15 to 4.4.19 (diff) | |
parent | Fixed NGINX config example indentation. (diff) | |
download | ferdium-server-2b3b2ae202bc24c0db9f135b9d5865abefa16afb.tar.gz ferdium-server-2b3b2ae202bc24c0db9f135b9d5865abefa16afb.tar.zst ferdium-server-2b3b2ae202bc24c0db9f135b9d5865abefa16afb.zip |
Merge pull request #48 from k0staa/master
Moving the server-docker repository to the server repository and enabling image building from the current version of the application code
-rw-r--r-- | .dockerignore | 20 | ||||
-rw-r--r-- | .env.example | 8 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Dockerfile | 27 | ||||
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | README.md | 93 | ||||
-rw-r--r-- | config/database.js | 7 | ||||
-rw-r--r-- | docker/.env | 1 | ||||
-rw-r--r-- | docker/README.md | 241 | ||||
-rw-r--r-- | docker/docker-compose.yml | 38 | ||||
-rwxr-xr-x | docker/entrypoint.sh | 34 | ||||
-rw-r--r-- | docker/logo.png | bin | 0 -> 340668 bytes | |||
-rw-r--r-- | package-lock.json | 42 | ||||
-rw-r--r-- | package.json | 1 |
14 files changed, 447 insertions, 74 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..110334e --- /dev/null +++ b/.dockerignore | |||
@@ -0,0 +1,20 @@ | |||
1 | .DS_Store | ||
2 | |||
3 | # ignore .git and .cache folders | ||
4 | .git* | ||
5 | .cache | ||
6 | |||
7 | # ignore all markdown files | ||
8 | *.md | ||
9 | |||
10 | # Ignore database files | ||
11 | *.sqlite | ||
12 | |||
13 | # ignore other directories | ||
14 | docker | ||
15 | !docker/entrypoint.sh | ||
16 | !docker/.env | ||
17 | node_modules | ||
18 | |||
19 | |||
20 | |||
diff --git a/.env.example b/.env.example index d507d6c..0c470e9 100644 --- a/.env.example +++ b/.env.example | |||
@@ -2,7 +2,7 @@ HOST=127.0.0.1 | |||
2 | PORT=3333 | 2 | PORT=3333 |
3 | NODE_ENV=development | 3 | NODE_ENV=development |
4 | 4 | ||
5 | APP_NAME=AdonisJs | 5 | APP_NAME=Ferdi-server |
6 | APP_URL=http://${HOST}:${PORT} | 6 | APP_URL=http://${HOST}:${PORT} |
7 | EXTERNAL_DOMAIN=ferdi.domain.tld | 7 | EXTERNAL_DOMAIN=ferdi.domain.tld |
8 | 8 | ||
@@ -17,10 +17,12 @@ DB_HOST=127.0.0.1 | |||
17 | DB_PORT=3306 | 17 | DB_PORT=3306 |
18 | DB_USER=root | 18 | DB_USER=root |
19 | DB_PASSWORD= | 19 | DB_PASSWORD= |
20 | DB_DATABASE=adonis | 20 | DB_DATABASE=ferdi |
21 | |||
22 | DB_SSL=false | 21 | DB_SSL=false |
23 | 22 | ||
23 | PUID=1000 | ||
24 | PGID=1000 | ||
25 | |||
24 | HASH_DRIVER=bcrypt | 26 | HASH_DRIVER=bcrypt |
25 | 27 | ||
26 | IS_CREATION_ENABLED=true | 28 | IS_CREATION_ENABLED=true |
@@ -5,16 +5,17 @@ node_modules | |||
5 | tmp | 5 | tmp |
6 | 6 | ||
7 | # Environment variables, never commit this file | 7 | # Environment variables, never commit this file |
8 | .env | 8 | # .env |
9 | 9 | ||
10 | # The development sqlite file | 10 | # The development sqlite file |
11 | data*/development.sqlite | 11 | *.sqlite |
12 | data*/adonis.sqlite | ||
13 | 12 | ||
14 | # Uploaded recipes | 13 | # Uploaded recipes |
15 | recipes/ | 14 | recipes/ |
16 | 15 | ||
17 | .DS_Store | 16 | .DS_Store |
17 | public/terms.html | ||
18 | public/privacy.html | ||
18 | 19 | ||
19 | resources/announcements/*.json | 20 | resources/announcements/*.json |
20 | !resources/announcements/version.json | 21 | !resources/announcements/version.json |
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..31dc994 --- /dev/null +++ b/Dockerfile | |||
@@ -0,0 +1,27 @@ | |||
1 | FROM node:lts-alpine as build | ||
2 | |||
3 | WORKDIR /server-build | ||
4 | |||
5 | RUN ["apk", "add", "--no-cache", "python", "make", "gcc", "g++", "libc-dev", "sqlite-dev"] | ||
6 | |||
7 | COPY . /server-build | ||
8 | |||
9 | RUN ["npm", "ci", "--production", "--build-from-source", "--sqlite=/usr/local"] | ||
10 | |||
11 | FROM node:lts-alpine | ||
12 | |||
13 | WORKDIR /app | ||
14 | LABEL maintainer="xthursdayx" | ||
15 | |||
16 | ENV HOST=0.0.0.0 PORT=3333 DATA_DIR="/data" | ||
17 | |||
18 | RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl", "su-exec"] | ||
19 | |||
20 | COPY --from=build /server-build /app | ||
21 | RUN ["npm", "i", "-g", "@adonisjs/cli"] | ||
22 | |||
23 | HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health | ||
24 | |||
25 | COPY docker/entrypoint.sh /entrypoint.sh | ||
26 | COPY docker/.env /app/.env | ||
27 | CMD ["/entrypoint.sh"] | ||
@@ -1,6 +1,6 @@ | |||
1 | MIT License | 1 | MIT License |
2 | 2 | ||
3 | Copyright (c) 2019 vantezzen | 3 | Copyright (c) 2019 Ferdi |
4 | 4 | ||
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy |
6 | of this software and associated documentation files (the "Software"), to deal | 6 | of this software and associated documentation files (the "Software"), to deal |
@@ -2,10 +2,10 @@ | |||
2 | <img src="./logo.png" alt="" width="300"/> | 2 | <img src="./logo.png" alt="" width="300"/> |
3 | </p> | 3 | </p> |
4 | 4 | ||
5 | # ferdi-server | 5 | # Ferdi-server |
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) |
@@ -16,13 +16,13 @@ Official Server software for the [Ferdi Messaging Browser](https://getferdi.com) | |||
16 | - [Transferring user data](#transferring-user-data) | 16 | - [Transferring user data](#transferring-user-data) |
17 | - [Creating and using custom recipes](#creating-and-using-custom-recipes) | 17 | - [Creating and using custom recipes](#creating-and-using-custom-recipes) |
18 | - [Listing custom recipes](#listing-custom-recipes) | 18 | - [Listing custom recipes](#listing-custom-recipes) |
19 | - [Contributing to ferdi-server's development](#contributing-to-ferdi-servers-development) | 19 | - [Contributing to Ferdi-server's development](#contributing-to-ferdi-servers-development) |
20 | - [License](#license) | 20 | - [License](#license) |
21 | 21 | ||
22 | ## Why use a custom Ferdi server? | 22 | ## Why use a custom Ferdi-server? |
23 | A custom server allows you to manage the data of all registered users yourself and add your own recipes to the repository. | 23 | A custom server allows you to manage the data of all registered users yourself and add your own recipes to the repository. |
24 | 24 | ||
25 | If you are not interested in doing this you can use our official instance of Ferdi server at <https://api.getferdi.com>. | 25 | If you are not interested in doing this you can use our official instance of Ferdi-server at <https://api.getferdi.com>. |
26 | 26 | ||
27 | ## Features | 27 | ## Features |
28 | - [x] User registration and login | 28 | - [x] User registration and login |
@@ -30,23 +30,25 @@ If you are not interested in doing this you can use our official instance of Fer | |||
30 | - [x] Workspace support | 30 | - [x] Workspace support |
31 | - [x] Functioning service store | 31 | - [x] Functioning service store |
32 | - [x] User dashboard | 32 | - [x] User dashboard |
33 | - [x] Export/import data to other ferdi-servers | 33 | - [x] Export/import data to other Ferdi-servers |
34 | - [ ] Password recovery | 34 | - [ ] Password recovery |
35 | - [ ] Recipe update | 35 | - [ ] Recipe update |
36 | 36 | ||
37 | ## Setup | 37 | ## Setup |
38 | ### with Docker | 38 | ### with Docker |
39 | The easiest way to set up Ferdi server on your server is with Docker. | 39 | The easiest way to set up Ferdi-server on your server is with Docker. |
40 | 40 | ||
41 | The Docker image can be run as is, with the default sqlite database or you can modifying your ENV variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). | 41 | The Docker image can be run as is, with the default SQLite database or you can modify your ENV variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). |
42 | After setting up the docker container we recommend you to set up an NGINX reverse proxy to access ferdi-server outside of your home network and protect it with an SSL certificate. | 42 | After setting up the docker container we recommend you set up an NGINX reverse proxy to access Ferdi-server outside of your home network and protect it with an SSL certificate. |
43 | |||
44 | **Warning**, please note that the use of the previous `config.txt` is now deprecated and a number of environmental variables have changed, specifically the default database name and location, the internal container port, and an additional `DATA_DIR` variable has been added. Make sure to pass the correct environmental variables to your container at runtime. If you are an existing Ferdi-server user, please see [the Ferdi docker documentation](./docker/README.md) for more information about migrating to the new image. | ||
43 | 45 | ||
44 | 1. Pull the Docker image | 46 | 1. Pull the Docker image |
45 | 47 | ||
46 | ```sh | 48 | ```sh |
47 | docker pull getferdi/ferdi-server | 49 | docker pull getferdi/ferdi-server |
48 | ``` | 50 | ``` |
49 | 2. Create a new Docker container with your desired configuration | 51 | 2. Create a *new* Docker container with your desired configuration **Existing users please seee the warning above.** |
50 | 52 | ||
51 | ```sh | 53 | ```sh |
52 | docker create \ | 54 | docker create \ |
@@ -71,56 +73,19 @@ After setting up the docker container we recommend you to set up an NGINX revers | |||
71 | -e IS_DASHBOARD_ENABLED=true \ | 73 | -e IS_DASHBOARD_ENABLED=true \ |
72 | -e IS_REGISTRATION_ENABLED=true \ | 74 | -e IS_REGISTRATION_ENABLED=true \ |
73 | -e CONNECT_WITH_FRANZ=true \ | 75 | -e CONNECT_WITH_FRANZ=true \ |
74 | -p <port>:80 \ | 76 | -e DATA_DIR=data \ |
75 | -v <path to data>:/config \ | 77 | -p <port>:3333 \ |
76 | -v <path to database>:/app/database \ | 78 | -v <path to data>:/data \ |
77 | -v <path to recipes>:/app/recipes \ | 79 | -v <path to recipes>:/app/recipes \ |
78 | --restart unless-stopped \ | 80 | --restart unless-stopped \ |
79 | getferdi/ferdi-server | 81 | getferdi/ferdi-server |
80 | ``` | 82 | ``` |
81 | 83 | ||
82 | Alternatively, you can also use docker-compose v2 schemas | 84 | Alternatively, you can also use docker-compose v2 schema. An example can be found [in the docker folder](./docker/docker-compose.yml). |
83 | |||
84 | ```sh | ||
85 | --- | ||
86 | version: "2" | ||
87 | services: | ||
88 | ferdi-server: | ||
89 | image: getferdi/ferdi-server | ||
90 | container_name: ferdi-server | ||
91 | environment: | ||
92 | - NODE_ENV=development | ||
93 | - EXTERNAL_DOMAIN=<ferdi-serverdomain> | ||
94 | - DB_CONNECTION=<database> | ||
95 | - DB_HOST=<yourdbhost> | ||
96 | - DB_PORT=<yourdbPORT> | ||
97 | - DB_USER=<yourdbuser> | ||
98 | - DB_PASSWORD=<yourdbpass> | ||
99 | - DB_DATABASE=<yourdbdatabase> | ||
100 | - DB_SSL=true/false | ||
101 | - MAIL_CONNECTION=<mailsender> | ||
102 | - SMPT_HOST=<smtpmailserver> | ||
103 | - SMTP_PORT=<smtpport> | ||
104 | - MAIL_SSL=true/false | ||
105 | - MAIL_USERNAME=<yourmailusername> | ||
106 | - MAIL_PASSWORD=<yourmailpassword> | ||
107 | - MAIL_SENDER=<sendemailaddress> | ||
108 | - IS_CREATION_ENABLED=true/false | ||
109 | - IS_DASHBOARD_ENABLED=true/false | ||
110 | - IS_REGISTRATION_ENABLED=true/false | ||
111 | - CONNECT_WITH_FRANZ=true/false | ||
112 | volumes: | ||
113 | - <path to data>:/config | ||
114 | - <path to database>:/app/database | ||
115 | - <path to recipes>:/app/recipes | ||
116 | ports: | ||
117 | - <port>:80 | ||
118 | restart: unless-stopped | ||
119 | ``` | ||
120 | 85 | ||
121 | 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). | 86 | 3. Optionally, you can [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 | 87 | ||
123 | For more information on configuring the Docker image, visit the Docker image repository at <https://github.com/getferdi/server-docker>. | 88 | For more information on configuring the Docker image, please read [the Ferdi docker documentation](./docker/README.md). |
124 | 89 | ||
125 | ### Manual setup | 90 | ### Manual setup |
126 | 91 | ||
@@ -143,19 +108,19 @@ For more information on configuring the Docker image, visit the Docker image rep | |||
143 | 108 | ||
144 | ## Configuration | 109 | ## Configuration |
145 | 110 | ||
146 | franz-server's configuration is saved inside the `.env` file. Besides AdonisJS's settings, ferdi-server has the following custom settings: | 111 | franz-server's configuration is saved inside an `.env` file. Besides AdonisJS's settings, Ferdi-server has the following custom settings: |
147 | - `IS_CREATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the [creation of custom recipes](#creating-and-using-custom-recipes) | 112 | - `IS_CREATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the [creation of custom recipes](#creating-and-using-custom-recipes) |
148 | - `IS_REGISTRATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the creation of new user accounts | 113 | - `IS_REGISTRATION_ENABLED` (`true` or `false`, default: `true`): Whether to enable the creation of new user accounts |
149 | - `IS_DASHBOARD_ENABLED` (`true` or `false`, default: `true`): Whether to enable the user dashboard | 114 | - `IS_DASHBOARD_ENABLED` (`true` or `false`, default: `true`): Whether to enable the user dashboard |
150 | - `CONNECT_WITH_FRANZ` (`true` or `false`, default: `true`): Whether to enable connections to the Franz server. By enabling this option, ferdi-server can: | 115 | - `CONNECT_WITH_FRANZ` (`true` or `false`, default: `true`): Whether to enable connections to the Franz server. By enabling this option, Ferdi-server can: |
151 | - Show the full Franz recipe library instead of only custom recipes | 116 | - Show the full Franz recipe library instead of only custom recipes |
152 | - Import Franz accounts | 117 | - Import Franz accounts |
153 | 118 | ||
154 | ## Importing your Franz account | 119 | ## Importing your Franz account |
155 | 120 | ||
156 | ferdi-server allows you to import your full Franz account, including all its settings. | 121 | Ferdi-server allows you to import your full Franz account, including all its settings. |
157 | 122 | ||
158 | To import your Franz account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz account details. ferdi-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. | 123 | To import your Franz account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz account details. Ferdi-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. |
159 | 124 | ||
160 | ## Transferring user data | 125 | ## Transferring user data |
161 | 126 | ||
@@ -163,26 +128,26 @@ Please refer to <https://github.com/getferdi/ferdi/wiki/Transferring-data-betwee | |||
163 | 128 | ||
164 | ## Creating and using custom recipes | 129 | ## Creating and using custom recipes |
165 | 130 | ||
166 | ferdi-server allows to extends the Franz recipe catalogue with custom Ferdi recipes. | 131 | Ferdi-server allows to extends the Franz recipe catalogue with custom Ferdi recipes. |
167 | 132 | ||
168 | For documentation on how to create a recipe, please visit [the official guide by Franz](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). | 133 | For documentation on how to create a recipe, please visit [the official guide by Franz](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). |
169 | 134 | ||
170 | To add your recipe to ferdi-server, open `http://[YOUR FERDI-SERVER]/new` in your browser. You can now define the following settings: | 135 | To add your recipe to Ferdi-server, open `http://[YOUR FERDI-SERVER]/new` in your browser. You can now define the following settings: |
171 | 136 | ||
172 | - `Author`: Author who created the recipe | 137 | - `Author`: Author who created the recipe |
173 | - `Name`: Name for your new service. Can contain spaces and unicode characters | 138 | - `Name`: Name for your new service. Can contain spaces and unicode characters |
174 | - `Service ID`: Unique ID for this recipe. Does not contain spaces or special characters (e.g. `google-drive`) | 139 | - `Service ID`: Unique ID for this recipe. Does not contain spaces or special characters (e.g. `google-drive`) |
175 | - `Link to SVG image`: Direct link to a 1024x1024 SVG that is used as a logo inside the store. Please use jsDelivr when using a file uploaded to GitHub as raw.githubusercontent files won't load | 140 | - `Link to SVG image`: Direct link to a 1024x1024 SVG image that is used as a logo inside the store. Please use jsDelivr when using a file uploaded to GitHub as raw.githubusercontent files won't load |
176 | - `Recipe files`: Recipe files that you created using the [Franz recipe creation guide](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). Please do *not* package your files beforehand - upload the raw files (you can drag and drop multiple files). ferdi-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files. | 141 | - `Recipe files`: Recipe files that you created using the [Franz recipe creation guide](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). Please do *not* package your files beforehand - upload the raw files (you can drag and drop multiple files). Ferdi-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files. |
177 | 142 | ||
178 | ### Listing custom recipes | 143 | ### Listing custom recipes |
179 | 144 | ||
180 | Inside Ferdi, searching for `ferdi:custom` will list all your custom recipes. | 145 | Inside Ferdi, searching for `ferdi:custom` will list all of your custom recipes. |
181 | 146 | ||
182 | ## Contributing to ferdi-server's development | 147 | ## Contributing to Ferdi-server's development |
183 | 148 | ||
184 | We welcome all contributors. Please read the [contributing guidelines](CONTRIBUTING.md) to setup your development machine and proceed. | 149 | We welcome all contributors. Please read the [contributing guidelines](CONTRIBUTING.md) to setup your development machine and proceed. |
185 | 150 | ||
186 | ## License | 151 | ## License |
187 | 152 | ||
188 | ferdi-server is licensed under the MIT License | 153 | Ferdi-server is licensed under the MIT License |
diff --git a/config/database.js b/config/database.js index b7f57ad..9372eda 100644 --- a/config/database.js +++ b/config/database.js | |||
@@ -1,3 +1,4 @@ | |||
1 | const path = require("path"); | ||
1 | 2 | ||
2 | /** @type {import('@adonisjs/framework/src/Env')} */ | 3 | /** @type {import('@adonisjs/framework/src/Env')} */ |
3 | const Env = use('Env'); | 4 | const Env = use('Env'); |
@@ -31,7 +32,7 @@ module.exports = { | |||
31 | sqlite: { | 32 | sqlite: { |
32 | client: 'sqlite3', | 33 | client: 'sqlite3', |
33 | connection: { | 34 | connection: { |
34 | filename: Helpers.appRoot(`${Env.get('DATA_DIR', 'database')}/${Env.get('DB_DATABASE', 'development')}.sqlite`), | 35 | filename: path.join(Env.get('DATA_DIR', 'data'), `${Env.get('DB_DATABASE', 'ferdi')}.sqlite`), |
35 | }, | 36 | }, |
36 | useNullAsDefault: true, | 37 | useNullAsDefault: true, |
37 | debug: Env.get('DB_DEBUG', false), | 38 | debug: Env.get('DB_DEBUG', false), |
@@ -54,7 +55,7 @@ module.exports = { | |||
54 | port: Env.get('DB_PORT', ''), | 55 | port: Env.get('DB_PORT', ''), |
55 | user: Env.get('DB_USER', 'root'), | 56 | user: Env.get('DB_USER', 'root'), |
56 | password: Env.get('DB_PASSWORD', ''), | 57 | password: Env.get('DB_PASSWORD', ''), |
57 | database: Env.get('DB_DATABASE', 'adonis'), | 58 | database: Env.get('DB_DATABASE', 'ferdi'), |
58 | }, | 59 | }, |
59 | debug: Env.get('DB_DEBUG', false), | 60 | debug: Env.get('DB_DEBUG', false), |
60 | }, | 61 | }, |
@@ -76,7 +77,7 @@ module.exports = { | |||
76 | port: Env.get('DB_PORT', ''), | 77 | port: Env.get('DB_PORT', ''), |
77 | user: Env.get('DB_USER', 'root'), | 78 | user: Env.get('DB_USER', 'root'), |
78 | password: Env.get('DB_PASSWORD', ''), | 79 | password: Env.get('DB_PASSWORD', ''), |
79 | database: Env.get('DB_DATABASE', 'adonis'), | 80 | database: Env.get('DB_DATABASE', 'ferdi'), |
80 | ssl: JSON.parse(Env.get('DB_SSL', 'true')), | 81 | ssl: JSON.parse(Env.get('DB_SSL', 'true')), |
81 | }, | 82 | }, |
82 | debug: Env.get('DB_DEBUG', false), | 83 | debug: Env.get('DB_DEBUG', false), |
diff --git a/docker/.env b/docker/.env new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docker/.env | |||
@@ -0,0 +1 @@ | |||
diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..33e78c0 --- /dev/null +++ b/docker/README.md | |||
@@ -0,0 +1,241 @@ | |||
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. | ||
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 | |||
6 | ## Why use a custom Ferdi-server? | ||
7 | A custom Ferdi-server allows you to experience the full potential of the Ferdi Client. It allows you to use all Premium features (e.g. Workspaces and custom URL recipes) and [add your own recipes](#creating-and-using-custom-recipes). | ||
8 | |||
9 | ## Features | ||
10 | - [x] User registration and login | ||
11 | - [x] Service creation, download, listing and removing | ||
12 | - [x] Workspace support | ||
13 | - [x] Functioning service store | ||
14 | - [x] User dashboard | ||
15 | - [x] Password recovery | ||
16 | - [x] Export/import data to other Ferdi-servers | ||
17 | - [ ] Recipe update | ||
18 | |||
19 | ## Installation & Setup | ||
20 | |||
21 | Here are some example snippets to help you get started creating a container. | ||
22 | |||
23 | The docker can be run as is, with the default sqlite database, or you can modify your environment variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). After setting up the docker container you will need to create a reverse proxy to access Ferdi-server outside of your home network, using a webserver such as NGINX. | ||
24 | |||
25 | **Existing users, please note:** The latest updates to Ferdi-server and the Ferdi-server Docker image introduce changes to the default SQLite database name and location, as well as the internal container port. The new container port is `3333`. If you would like to keep your existing SQLite database, you will need to add the `DATA_DIR` variable and change it to `/app/database`, to match your existing data volume. You will also need to change the `DB_DATABASE` variable to `development` to match your existing database. Please see the parameters in the [Migration section](#migrating-from-an-existing-ferdi-server) below. | ||
26 | |||
27 | ### docker | ||
28 | |||
29 | Pull the docker image: | ||
30 | |||
31 | docker pull getferdi/ferdi-server | ||
32 | |||
33 | To create the docker container with the proper parameters: | ||
34 | |||
35 | docker create \ | ||
36 | --name=ferdi-server \ | ||
37 | -e NODE_ENV=development \ | ||
38 | -e EXTERNAL_DOMAIN=<ferdi-serverdomain> \ | ||
39 | -e DB_CONNECTION=<database> \ | ||
40 | -e DB_HOST=<yourdbhost> \ | ||
41 | -e DB_PORT=<yourdbport> \ | ||
42 | -e DB_USER=<yourdbuser> \ | ||
43 | -e DB_PASSWORD=<yourdbpass> \ | ||
44 | -e DB_DATABASE=<yourdbdatabase> \ | ||
45 | -e DB_SSL=false \ | ||
46 | -e MAIL_CONNECTION=smtp \ | ||
47 | -e SMPT_HOST=<smtpmailserver> \ | ||
48 | -e SMTP_PORT=<smtpport> \ | ||
49 | -e MAIL_SSL=true/false \ | ||
50 | -e MAIL_USERNAME=<yourmailusername> \ | ||
51 | -e MAIL_PASSWORD=<yourmailpassword> \ | ||
52 | -e MAIL_SENDER=<sendemailaddress> \ | ||
53 | -e IS_CREATION_ENABLED=true \ | ||
54 | -e IS_DASHBOARD_ENABLED=true \ | ||
55 | -e IS_REGISTRATION_ENABLED=true \ | ||
56 | -e CONNECT_WITH_FRANZ=true \ | ||
57 | -e DATA_DIR=/data \ | ||
58 | -p <port>:3333 \ | ||
59 | -v <path to data>:/data \ | ||
60 | -v <path to recipes>:/app/recipes \ | ||
61 | --restart unless-stopped \ | ||
62 | getferdi/ferdi-server | ||
63 | |||
64 | ### docker-compose | ||
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). | ||
67 | |||
68 | To start the application, use `docker-compose up -d`. | ||
69 | The server will be launched at [http://localhost:3333/](http://localhost:3333/) address. | ||
70 | |||
71 | ## Configuration | ||
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. | ||
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> | ||
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 | |||
78 | | Parameter | Function | | ||
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 | | ||
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 | | ||
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 | | ||
85 | | `-e DB_PORT=<yourdbport>` | for specifying the database port, default is 3306 | | ||
86 | | `-e DB_USER=<yourdbuser>` | for specifying the database user, default is root | | ||
87 | | `-e DB_PASSWORD=<yourdbpass>` | for specifying the database password, default is password | | ||
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 | | ||
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 | | ||
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 | | ||
94 | | `-e MAIL_USERNAME=<yourmailusername>` | for specifying your mail username to be used, default is username | | ||
95 | | `-e MAIL_PASSWORD=<yourmailpassword>` | for specifying your mail password to be used, default is password | | ||
96 | | `-e MAIL_SENDER=<sendemailaddress` | for specifying the mail sender address to be used, default is noreply@getferdi.com | | ||
97 | | `-e IS_CREATION_ENABLED=true` | for specifying whether to enable the [creation of custom recipes](#creating-and-using-custom-recipes), default is true | | ||
98 | | `-e IS_DASHBOARD_ENABLED=true` | for specifying whether to enable the Ferdi-server dashboard, default is true | | ||
99 | | `-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 DATA_DIR=data` | for specifying the SQLite database folder, default is data | | ||
102 | | `-v <path to data on host>:/data` | this will store Ferdi-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 | | `-v <path to recipes on host>:/app/recipes` | this will store Ferdi-server's recipes on the docker host for persistence | | ||
104 | |||
105 | By enabling the `CONNECT_WITH_FRANZ` option, Ferdi-server can: | ||
106 | - Show the full Franz recipe library instead of only custom recipes | ||
107 | - Import Franz accounts | ||
108 | |||
109 | ## Supported databases and drivers | ||
110 | |||
111 | To use a different database than the default, SQLite3, enter the driver code below in your ENV configuration. | ||
112 | |||
113 | | Database | Driver | | ||
114 | | :----: | --- | | ||
115 | | MariaDB/MySQL | mysql | | ||
116 | | PostgreSQL | pg | | ||
117 | | SQLite3 | sqlite | | ||
118 | |||
119 | ## Supported mail connections (advanced) | ||
120 | |||
121 | To use a different email sender than the default, SMTP, enter the correct information in your ENV configuration and adapt your docker run, create, or compose commands accordingly. | ||
122 | |||
123 | | Mail Connection | ENV variables | | ||
124 | | :----: | --- | | ||
125 | | SMTP | SMTP_PORT, SMTP_HOST, MAIL_USERNAME, MAIL_PASSWORD, MAIL_SSL | | ||
126 | | SparkPost | SPARKPOST_API_KEY | | ||
127 | | Mailgun | MAILGUN_DOMAIN, MAILGUN_API_REGION, MAILGUN_API_KEY | | ||
128 | | (**Deprecated**) Ethereal | A disposable account is created automatically if you choose this option. | | ||
129 | |||
130 | ## Migrating from an existing Ferdi-server | ||
131 | |||
132 | If you are an existing Ferdi-server user using the built-in `SQlite` database, you should include the following variables: | ||
133 | | Parameter | Function | | ||
134 | | :----: | --- | | ||
135 | | `-p 3333:3333` | existing Ferdi-server users will need to update their container port mappings from `80:3333` to `3333:3333` | | ||
136 | | `-e DB_PASSWORD=development` | existing Ferdi-server users who use the built-in sqlite database should use the database name `development` | | ||
137 | | `-e DATA_DIR=/app/database` | existing Ferdi-server users who use the built-in sqlite database should add this environmental variable to ensure data persistence | | ||
138 | | `-v <path to data on host>=/app/databases` | existing Ferdi-server users who use the built-in sqlite database should use the volume name `/app/database` | | ||
139 | |||
140 | If you are an existing Ferdi-server user who usees an external database or different variables for the built-in `SQlite` database, you should updatae your parameterse acordingly. For exaple, if you aree using an exterenal MariaDB or MYSql database your unique parameters might look like this: | ||
141 | | Parameter | Function | | ||
142 | | :----: | --- | | ||
143 | | `-e DB_CONNECTION=mysql` | for specifying the database being used | | ||
144 | | `-e DB_HOST=192.168.10.1` | for specifying the database host machine IP | | ||
145 | | `-e DB_PORT=3306` | for specifying the database port | | ||
146 | | `-e DB_USER=ferdi` | for specifying the database user | | ||
147 | | `-e DB_PASSWORD=ferdipw` | for specifying the database password| | ||
148 | | `-e DB_DATABASE=adonis` | for specifying the database to be used| | ||
149 | | `-v <path to database>:/app/database` | this will strore Ferdi-server's database 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 | |||
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 | |||
154 | ## NGINX config block | ||
155 | |||
156 | To access Ferdi-server from outside of your home network on a subdomain use this server block: | ||
157 | |||
158 | ``` | ||
159 | # Ferdi-server | ||
160 | server { | ||
161 | listen 443 ssl http2; | ||
162 | server_name ferdi.my.website; | ||
163 | |||
164 | # all ssl related config moved to ssl.conf | ||
165 | include /config/nginx/ssl.conf; | ||
166 | |||
167 | location / { | ||
168 | proxy_pass http://<Ferdi-IP>:3333; | ||
169 | proxy_set_header X-Real-IP $remote_addr; | ||
170 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
171 | proxy_set_header Host $host; | ||
172 | proxy_set_header X-Forwarded-Proto $scheme; | ||
173 | } | ||
174 | } | ||
175 | ``` | ||
176 | |||
177 | ## Importing your Franz account | ||
178 | |||
179 | Ferdi-server allows you to import your full Franz account, including all its settings. | ||
180 | |||
181 | To import your Franz account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz account details. Ferdi-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. | ||
182 | |||
183 | ## Transferring user data | ||
184 | |||
185 | Please refer to <https://github.com/getferdi/ferdi/wiki/Transferring-data-between-servers> | ||
186 | |||
187 | ## Creating and using custom recipes | ||
188 | |||
189 | Ferdi-server allows to extends the Franz recipe catalogue with custom Ferdi recipes. | ||
190 | |||
191 | For documentation on how to create a recipe, please visit [the official guide by Franz](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). | ||
192 | |||
193 | To add your recipe to Ferdi-server, open `http://[YOUR FERDI-SERVER]/new` in your browser. You can now define the following settings: | ||
194 | - `Author`: Author who created the recipe | ||
195 | - `Name`: Name for your new service. Can contain spaces and unicode characters | ||
196 | - `Service ID`: Unique ID for this recipe. Does not contain spaces or special characters (e.g. `google-drive`) | ||
197 | - `Link to PNG/SVG image`: Direct link to a 1024x1024 PNG image and SVG that is used as a logo inside the store. Please use jsDelivr when using a file uploaded to GitHub as raw.githubusercontent files won't load | ||
198 | - `Recipe files`: Recipe files that you created using the [Franz recipe creation guide](https://github.com/meetfranz/plugins/blob/master/docs/integration.md). Please do *not* package your files beforehand - upload the raw files (you can drag and drop multiple files). Ferdi-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files. | ||
199 | |||
200 | ### Listing custom recipes | ||
201 | |||
202 | Inside Ferdi, searching for `ferdi:custom` will list all your custom recipes. | ||
203 | |||
204 | ## Support Info | ||
205 | |||
206 | * Shell access while the container is running: `docker exec -it ferdi-server /bin/bash` | ||
207 | * To monitor the logs of the container in realtime: `docker logs -f ferdi-server` | ||
208 | |||
209 | ## Updating Info | ||
210 | |||
211 | Below are the instructions for updating the container to get the most recent version of Ferdi-server: | ||
212 | |||
213 | ### Via Docker Run/Create | ||
214 | |||
215 | * Update the image: `docker pull getferdi/ferdi-server` | ||
216 | * Stop the running container: `docker stop 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) | ||
219 | * Start the new container: `docker start ferdi-server` | ||
220 | * You can also remove the old dangling images: `docker image prune` | ||
221 | |||
222 | ### Via Docker Compose | ||
223 | |||
224 | * Update all images: `docker-compose pull` | ||
225 | * or update a single image: `docker-compose pull ferdi-server` | ||
226 | * Let compose update all containers as necessary: `docker-compose up -d` | ||
227 | * or update a single container: `docker-compose up -d ferdi-server` | ||
228 | * You can also remove the old dangling images: `docker image prune` | ||
229 | |||
230 | ## Building locally | ||
231 | |||
232 | If you want to build this image locally, please run this command from root of [Ferdi-server repository](https://github.com/getferdi/server/tree/master/): | ||
233 | ``` | ||
234 | docker build \ | ||
235 | --no-cache \ | ||
236 | --pull \ | ||
237 | -t getferdi/ferdi-server:latest . | ||
238 | ``` | ||
239 | |||
240 | ## License | ||
241 | Ferdi-server-docker and Ferdi-server are licensed under the MIT License. | ||
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..bd66ba2 --- /dev/null +++ b/docker/docker-compose.yml | |||
@@ -0,0 +1,38 @@ | |||
1 | version: "2" | ||
2 | services: | ||
3 | ferdi-server: | ||
4 | image: getferdi/ferdi-server | ||
5 | container_name: ferdi-server | ||
6 | environment: | ||
7 | - NODE_ENV=development | ||
8 | - EXTERNAL_DOMAIN=localhost | ||
9 | - DB_CONNECTION=sqlite | ||
10 | - DB_HOST=127.0.0.1 | ||
11 | - DB_PORT=3306 | ||
12 | - DB_USER=root | ||
13 | - DB_PASSWORD=password | ||
14 | - DB_DATABASE=ferdi | ||
15 | - DB_SSL=false | ||
16 | - MAIL_CONNECTION=smtp | ||
17 | - SMPT_HOST=127.0.0.1 | ||
18 | - SMTP_PORT=2525 | ||
19 | - MAIL_SSL=false | ||
20 | - MAIL_USERNAME=username | ||
21 | - MAIL_PASSWORD=password | ||
22 | - MAIL_SENDER=noreply@getferdi.com | ||
23 | - IS_CREATION_ENABLED=true | ||
24 | - IS_DASHBOARD_ENABLED=true | ||
25 | - IS_REGISTRATION_ENABLED=true | ||
26 | - CONNECT_WITH_FRANZ=false | ||
27 | - DATA_DIR=/data | ||
28 | - PUID=1000 | ||
29 | - PGID=1000 | ||
30 | volumes: | ||
31 | - ferdi-database-vol:/data | ||
32 | - ferdi-recipes-vol:/app/recipes | ||
33 | ports: | ||
34 | - 3333:3333 | ||
35 | restart: unless-stopped | ||
36 | volumes: | ||
37 | ferdi-database-vol: | ||
38 | ferdi-recipes-vol: | ||
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100755 index 0000000..2a91839 --- /dev/null +++ b/docker/entrypoint.sh | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | cat << EOL | ||
4 | ------------------------------------- | ||
5 | ____ ___ | ||
6 | / __/__ _______/ (_) | ||
7 | / _// -_) __/ _ / / | ||
8 | _/_/ \__/_/ \_,_/_/ | ||
9 | / __/__ _____ _____ ____ | ||
10 | _\ \/ -_) __/ |/ / -_) __/ | ||
11 | /___/\__/_/ |___/\__/_/ | ||
12 | Brought to you by getferdi.com | ||
13 | Support our Open Collective at: | ||
14 | https://opencollective.com/getferdi/ | ||
15 | EOL | ||
16 | |||
17 | # Create APP key if needed | ||
18 | if [[ -z ${APP_KEY} && ! -f "${DATA_DIR}/FERDI_APP_KEY.txt" ]]; then | ||
19 | echo "**** Generating Ferdi-server app key for first run ****" | ||
20 | adonis key:generate | ||
21 | APP_KEY=$(grep APP_KEY .env | cut -d '=' -f2) | ||
22 | echo "${APP_KEY}" > "${DATA_DIR}/FERDI_APP_KEY.txt" | ||
23 | echo "**** App Key set to $APP_KEY you can modify FERDI_APP_KEY.txt to update your key ****" | ||
24 | else APP_KEY=$(cat "${DATA_DIR}/FERDI_APP_KEY.txt") | ||
25 | echo "**** App Key set to $APP_KEY you can modify FERDI_APP_KEY.txt to update your key ****" | ||
26 | fi | ||
27 | |||
28 | export APP_KEY | ||
29 | |||
30 | node ace migration:run --force | ||
31 | |||
32 | chown -R "${PUID:-1000}":"${PGID:-1000}" "$DATA_DIR" /app | ||
33 | |||
34 | su-exec "${PUID:-1000}":"${PGID:-1000}" node server.js#!/bin/bash | ||
diff --git a/docker/logo.png b/docker/logo.png new file mode 100644 index 0000000..587e0b8 --- /dev/null +++ b/docker/logo.png | |||
Binary files differ | |||
diff --git a/package-lock.json b/package-lock.json index 71640e6..25f4a92 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -1179,6 +1179,11 @@ | |||
1179 | "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", | 1179 | "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", |
1180 | "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" | 1180 | "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" |
1181 | }, | 1181 | }, |
1182 | "bignumber.js": { | ||
1183 | "version": "9.0.0", | ||
1184 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", | ||
1185 | "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" | ||
1186 | }, | ||
1182 | "bl": { | 1187 | "bl": { |
1183 | "version": "1.2.3", | 1188 | "version": "1.2.3", |
1184 | "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", | 1189 | "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", |
@@ -4069,6 +4074,38 @@ | |||
4069 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", | 4074 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", |
4070 | "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" | 4075 | "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" |
4071 | }, | 4076 | }, |
4077 | "mysql": { | ||
4078 | "version": "2.18.1", | ||
4079 | "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", | ||
4080 | "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", | ||
4081 | "requires": { | ||
4082 | "bignumber.js": "9.0.0", | ||
4083 | "readable-stream": "2.3.7", | ||
4084 | "safe-buffer": "5.1.2", | ||
4085 | "sqlstring": "2.3.1" | ||
4086 | }, | ||
4087 | "dependencies": { | ||
4088 | "readable-stream": { | ||
4089 | "version": "2.3.7", | ||
4090 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", | ||
4091 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", | ||
4092 | "requires": { | ||
4093 | "core-util-is": "~1.0.0", | ||
4094 | "inherits": "~2.0.3", | ||
4095 | "isarray": "~1.0.0", | ||
4096 | "process-nextick-args": "~2.0.0", | ||
4097 | "safe-buffer": "~5.1.1", | ||
4098 | "string_decoder": "~1.1.1", | ||
4099 | "util-deprecate": "~1.0.1" | ||
4100 | } | ||
4101 | }, | ||
4102 | "safe-buffer": { | ||
4103 | "version": "5.1.2", | ||
4104 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||
4105 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||
4106 | } | ||
4107 | } | ||
4108 | }, | ||
4072 | "nan": { | 4109 | "nan": { |
4073 | "version": "2.14.0", | 4110 | "version": "2.14.0", |
4074 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", | 4111 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", |
@@ -6030,6 +6067,11 @@ | |||
6030 | "request": "^2.87.0" | 6067 | "request": "^2.87.0" |
6031 | } | 6068 | } |
6032 | }, | 6069 | }, |
6070 | "sqlstring": { | ||
6071 | "version": "2.3.1", | ||
6072 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", | ||
6073 | "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" | ||
6074 | }, | ||
6033 | "sshpk": { | 6075 | "sshpk": { |
6034 | "version": "1.16.1", | 6076 | "version": "1.16.1", |
6035 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", | 6077 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", |
diff --git a/package.json b/package.json index 77d05e7..eb5c3a2 100644 --- a/package.json +++ b/package.json | |||
@@ -41,6 +41,7 @@ | |||
41 | "atob": "^2.1.2", | 41 | "atob": "^2.1.2", |
42 | "btoa": "^1.2.1", | 42 | "btoa": "^1.2.1", |
43 | "fs-extra": "^8.1.0", | 43 | "fs-extra": "^8.1.0", |
44 | "mysql": "2.18.1", | ||
44 | "node-fetch": "^2.6.1", | 45 | "node-fetch": "^2.6.1", |
45 | "pg": "^7.18.2", | 46 | "pg": "^7.18.2", |
46 | "sqlite3": "^4.1.0", | 47 | "sqlite3": "^4.1.0", |