diff options
author | 2021-08-17 20:25:54 +0000 | |
---|---|---|
committer | 2021-08-17 20:25:54 +0000 | |
commit | ca11636dfe0b087b65c6e768140d46fceee1e1b5 (patch) | |
tree | 2162986c5db18da27b15edada2dbc1debed73cc3 /Dockerfile | |
parent | Bump path-parse from 1.0.6 to 1.0.7 (diff) | |
parent | Update Dockerfile (diff) | |
download | ferdium-server-ca11636dfe0b087b65c6e768140d46fceee1e1b5.tar.gz ferdium-server-ca11636dfe0b087b65c6e768140d46fceee1e1b5.tar.zst ferdium-server-ca11636dfe0b087b65c6e768140d46fceee1e1b5.zip |
Merge pull request #1 from k0staa/master
Test merge
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 27 |
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 @@ | |||
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"] | ||