aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
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"]