forked from alexmanno/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
14 changed files
with
447 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.DS_Store | ||
|
||
# ignore .git and .cache folders | ||
.git* | ||
.cache | ||
|
||
# ignore all markdown files | ||
*.md | ||
|
||
# Ignore database files | ||
*.sqlite | ||
|
||
# ignore other directories | ||
docker | ||
!docker/entrypoint.sh | ||
!docker/.env | ||
node_modules | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM node:lts-alpine as build | ||
|
||
WORKDIR /server-build | ||
|
||
RUN ["apk", "add", "--no-cache", "python", "make", "gcc", "g++", "libc-dev", "sqlite-dev"] | ||
|
||
COPY . /server-build | ||
|
||
RUN ["npm", "ci", "--production", "--build-from-source", "--sqlite=/usr/local"] | ||
|
||
FROM node:lts-alpine | ||
|
||
WORKDIR /app | ||
LABEL maintainer="xthursdayx" | ||
|
||
ENV HOST=0.0.0.0 PORT=3333 DATA_DIR="/data" | ||
|
||
RUN ["apk", "add", "--no-cache", "sqlite-libs", "curl", "su-exec"] | ||
|
||
COPY --from=build /server-build /app | ||
RUN ["npm", "i", "-g", "@adonisjs/cli"] | ||
|
||
HEALTHCHECK --interval=5m --timeout=3s CMD curl -sSf http://localhost:${PORT}/health | ||
|
||
COPY docker/entrypoint.sh /entrypoint.sh | ||
COPY docker/.env /app/.env | ||
CMD ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Oops, something went wrong.