-
-
Notifications
You must be signed in to change notification settings - Fork 82
Added support for running node server in Docker #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
m0ngr31
wants to merge
21
commits into
thepeacockproject:master
Choose a base branch
from
m0ngr31:feature/docker-setup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+80
−4
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
95631be
Added support for running node server in Docker
m0ngr31 d8d6773
Move container to be pinned to nvmrc version
m0ngr31 9657005
WIP for docker on cirrus ci
m0ngr31 5f5a387
WIP for docker on cirrus ci
m0ngr31 d45d4ac
WIP for docker on cirrus ci
m0ngr31 ce2a52c
WIP for docker on cirrus ci
m0ngr31 038f098
WIP for docker on cirrus ci
m0ngr31 22eb46d
WIP for docker on cirrus ci
m0ngr31 a4ed220
WIP for docker on cirrus ci
m0ngr31 b81a234
WIP for docker on cirrus ci
m0ngr31 8b705f0
WIP for docker on cirrus ci
m0ngr31 6d9e64d
WIP for docker on cirrus ci
m0ngr31 3d088e3
WIP for docker on cirrus ci
m0ngr31 88201f0
WIP for docker on cirrus ci
m0ngr31 2dd3b03
WIP for docker on cirrus ci
m0ngr31 6fc557d
WIP for docker on cirrus ci
m0ngr31 34c926d
WIP for docker on cirrus ci
m0ngr31 a127e55
WIP for docker on cirrus ci
m0ngr31 94915fe
WIP for docker on cirrus ci
m0ngr31 ca3ff21
Finally have Docker building an image properly
m0ngr31 f6afaab
Finally have Docker building an image properly
m0ngr31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,18 @@ | ||
| FROM node:22.13.0-alpine3.21 | ||
|
|
||
| RUN apk add --update su-exec shadow jq | ||
|
|
||
| RUN rm -rf /var/cache/apk/* | ||
|
|
||
| RUN mkdir /app_build | ||
| RUN mkdir /app_linux | ||
| WORKDIR /app_build | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN chmod +x packaging/docker-build.sh | ||
| RUN chmod +x packaging/entrypoint.sh | ||
|
|
||
| RUN packaging/docker-build.sh | ||
|
|
||
| ENTRYPOINT ["./packaging/entrypoint.sh"] |
This file contains hidden or 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 hidden or 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,6 @@ | ||
| #!/bin/sh | ||
|
|
||
| VERSION=$(jq -r '.version' package.json) | ||
| BUILD_DIR=Peacock-v"$VERSION"-linux | ||
|
|
||
| cp -r "$BUILD_DIR"/* /app_linux |
This file contains hidden or 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,30 @@ | ||
| #!/bin/sh | ||
|
|
||
| mkdir -p /app | ||
|
|
||
| cp /app_linux/chunk0* /app | ||
| cp -r /app_linux/resources /app | ||
| cp -r /app_linux/webui /app | ||
|
|
||
| cd /app | ||
|
|
||
| if [ -z "$PUID" ] || [ -z "$PGID" ]; then | ||
| exec node chunk0.js | ||
| else | ||
| EXISTING_USER=$(getent passwd "$PUID" | cut -d: -f1) | ||
| EXISTING_GROUP=$(getent group "$PGID" | cut -d: -f1) | ||
|
|
||
| if [ -z "$EXISTING_USER" ]; then | ||
| adduser -u $PUID -D abc | ||
| EXISTING_USER=abc | ||
| fi | ||
|
|
||
| if [ -z "$EXISTING_GROUP" ]; then | ||
| groupmod -g $PGID abc | ||
| EXISTING_GROUP=abc | ||
| fi | ||
|
|
||
| chown $EXISTING_USER:$EXISTING_GROUP -R /app | ||
|
|
||
| su-exec $EXISTING_USER node chunk0.js | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's a directory I had made for mounting the container in while testing. I can remove that line if needed