aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorLibravatar thursday <xthursdayx@mailbox.org>2021-09-18 02:21:13 -0400
committerLibravatar GitHub <noreply@github.com>2021-09-18 02:21:13 -0400
commit2b3b2ae202bc24c0db9f135b9d5865abefa16afb (patch)
treec952dbef8aba5db71a652759a32cbb8a35f4fac9 /Dockerfile
parentBump tar from 4.4.15 to 4.4.19 (diff)
parentFixed NGINX config example indentation. (diff)
downloadferdium-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
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..31dc994
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
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 DATA_DIR="/data"
17
18RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl", "su-exec"]
19
20COPY --from=build /server-build /app
21RUN ["npm", "i", "-g", "@adonisjs/cli"]
22
23HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health
24
25COPY docker/entrypoint.sh /entrypoint.sh
26COPY docker/.env /app/.env
27CMD ["/entrypoint.sh"]