aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorLibravatar Michal Kostewicz <m.kostewicz84@gmail.com>2021-02-07 14:23:57 +0100
committerLibravatar Michal Kostewicz <m.kostewicz84@gmail.com>2021-02-07 14:23:57 +0100
commit02000d89159ba171cabbd341139871236f3df386 (patch)
treec1b4806a347fa6e6b224f42eae36011a71e24309 /docker
parentChange database.js so any system folder can be used to keep database files (diff)
downloadferdium-server-02000d89159ba171cabbd341139871236f3df386.tar.gz
ferdium-server-02000d89159ba171cabbd341139871236f3df386.tar.zst
ferdium-server-02000d89159ba171cabbd341139871236f3df386.zip
Revert line which choose DB folder using env. Move Dockerfile to root. Simplify export in entrypoint. Update README
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile27
-rw-r--r--docker/README.md1
-rw-r--r--docker/docker-compose.yml6
-rwxr-xr-xdocker/entrypoint.sh2
4 files changed, 5 insertions, 31 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index 799bb0b..0000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
1FROM node:lts-alpine as build
2
3WORKDIR /server-build
4
5RUN ["apk", "add", "--no-cache", "python", "make", "gcc", "g++", "libc-dev", "sqlite-dev"]
6
7COPY . /server-build
8
9RUN ["npm", "ci", "--production", "--build-from-source", "--sqlite=/usr/local"]
10
11FROM node:lts-alpine
12
13WORKDIR /app
14LABEL maintainer="xthursdayx"
15
16ENV HOST=0.0.0.0 PORT=3333
17
18RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl"]
19
20COPY --from=build /server-build /app
21RUN ["touch", ".env"]
22RUN ["npm", "i", "-g", "@adonisjs/cli"]
23
24HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health
25
26COPY docker/entrypoint.sh /entrypoint.sh
27CMD ["/entrypoint.sh"] \ No newline at end of file
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