diff options
author | vantezzen <hello@vantezzen.io> | 2019-10-01 22:21:58 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-10-01 22:21:58 +0200 |
commit | 1966eac61586eee0a26bf535e5179ffdc751108c (patch) | |
tree | 5f77c640aaedd55f063a6866f07ea986b5eca9b3 /README.md | |
parent | Update README.md (diff) | |
download | ferdium-server-1966eac61586eee0a26bf535e5179ffdc751108c.tar.gz ferdium-server-1966eac61586eee0a26bf535e5179ffdc751108c.tar.zst ferdium-server-1966eac61586eee0a26bf535e5179ffdc751108c.zip |
Add Docker installation instructions
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 61 |
1 files changed, 61 insertions, 0 deletions
@@ -25,6 +25,67 @@ You can try a demo of ferdi-server by settings your server to <https://ferdi.van | |||
25 | - [ ] Recipe update | 25 | - [ ] Recipe update |
26 | 26 | ||
27 | ## Setup | 27 | ## Setup |
28 | ### with Docker | ||
29 | The easiest way to set up ferdi-server on your server is with Docker. | ||
30 | |||
31 | 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). | ||
32 | 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. | ||
33 | |||
34 | 1. Pull the Docker image | ||
35 | |||
36 | ```sh | ||
37 | docker pull getferdi/ferdi-server | ||
38 | ``` | ||
39 | 2. Create a new Docker container with your desired configuration | ||
40 | |||
41 | ```sh | ||
42 | docker create \ | ||
43 | --name=ferdi-server \ | ||
44 | -e NODE_ENV=development \ | ||
45 | -e DB_CONNECTION=<database> \ | ||
46 | -e DB_HOST=<yourdbhost> \ | ||
47 | -e DB_PORT=<yourdbPORT> \ | ||
48 | -e DB_USER=<yourdbuser> \ | ||
49 | -e DB_PASSWORD=<yourdbpass> \ | ||
50 | -e DB_DATABASE=<yourdbdatabase> \ | ||
51 | -e IS_CREATION_ENABLED=true \ | ||
52 | -e CONNECT_WITH_FRANZ=true \ | ||
53 | -p <port>:80 \ | ||
54 | -v <path to data>:/config \ | ||
55 | --restart unless-stopped \ | ||
56 | getferdi/ferdi-server | ||
57 | ``` | ||
58 | |||
59 | Alternatively, you can also use docker-compose v2 schemas | ||
60 | |||
61 | ```sh | ||
62 | --- | ||
63 | version: "2" | ||
64 | services: | ||
65 | ferdi-server: | ||
66 | image: xthursday/ferdi-server-docker | ||
67 | container_name: ferdi-server | ||
68 | environment: | ||
69 | - NODE_ENV=development | ||
70 | - DB_CONNECTION=<database> | ||
71 | - DB_HOST=<yourdbhost> | ||
72 | - DB_PORT=<yourdbPORT> | ||
73 | - DB_USER=<yourdbuser> | ||
74 | - DB_PASSWORD=<yourdbpass> | ||
75 | - DB_DATABASE=<yourdbdatabase> | ||
76 | - IS_CREATION_ENABLED=true/false | ||
77 | - CONNECT_WITH_FRANZ=true/flase | ||
78 | volumes: | ||
79 | - <path to data>:/config | ||
80 | ports: | ||
81 | - <port>:80 | ||
82 | restart: unless-stopped | ||
83 | ``` | ||
84 | 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). | ||
85 | |||
86 | For more information on configuring the Docker image, visit the Docker image repository at <https://github.com/getferdi/ferdi-server>. | ||
87 | |||
88 | ### Manual setup | ||
28 | 1. Clone this repository | 89 | 1. Clone this repository |
29 | 2. Install the [AdonisJS CLI](https://adonisjs.com/) | 90 | 2. Install the [AdonisJS CLI](https://adonisjs.com/) |
30 | 3. Copy `.env.example` to `.env` and edit the [configuration](#configuration) to your needs | 91 | 3. Copy `.env.example` to `.env` and edit the [configuration](#configuration) to your needs |