forked from radicle-dev/radicle-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add basic container packaging #9
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6f7aeaa
Adds basic container packaging
gsaslis 03b601e
switches to simpler caddyfile
gsaslis beadb69
fixes container image build and adds compose packaging
gsaslis 820dd12
adds container image name with public repo
gsaslis f47a7e4
adds necessary build args to support local deployment in container image
gsaslis 09d203d
fixes default port to the default of the docker-compose deployment
gsaslis 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 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,12 @@ | ||
localhost:80 { | ||
root * /usr/share/caddy | ||
try_files {path} /index.html | ||
file_server | ||
#header @static Cache-Control "public, max-age=259200" | ||
#encode zstd gzip | ||
#@skip path_regexp \.(wasm|js|css|png|jpe?g|gif|ico|woff2?|otf|ttf|eot|svg|txt|pdf|docx?|xlsx?)$ | ||
#@static { | ||
# file | ||
# path *.ico *.css *.js *.gif *.webp *.avif *.jpg *.jpeg *.png *.svg *.woff *.woff2 | ||
#} | ||
} |
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,26 @@ | ||
FROM node:20 AS build | ||
|
||
WORKDIR /app | ||
|
||
ARG FALLBACK_PUBLIC_EXPLORER | ||
ARG DEFAULT_LOCAL_HTTPD_PORT | ||
ARG PLUGINS_RADICLE_PLANNING_BOARDS_ORIGIN | ||
|
||
# copy project file | ||
COPY package.json package-lock.json ./ | ||
COPY ./scripts ./scripts | ||
COPY ./public ./public | ||
|
||
# install all deps (vite is needed when building, which is a dev dependency) | ||
RUN npm install | ||
|
||
COPY . ./ | ||
RUN npm run build | ||
|
||
|
||
FROM caddy:2.8-alpine | ||
|
||
COPY --from=build /app/build /usr/share/caddy | ||
|
||
|
||
|
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 @@ | ||
Containerfile |
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,21 @@ | ||
version: '3.8' | ||
|
||
services: | ||
radicle-explorer-with-boards: | ||
image: quay.io/radicle_in_containers/radicle-explorer-with-boards | ||
container_name: radicle-explorer-with-boards | ||
build: | ||
dockerfile: ./Containerfile | ||
context: . | ||
args: | ||
FALLBACK_PUBLIC_EXPLORER: http://localhost:3080/nodes/$host/$rid$path | ||
DEFAULT_LOCAL_HTTPD_PORT: 8886 | ||
PLUGINS_RADICLE_PLANNING_BOARDS_ORIGIN: http://localhost:3090 | ||
ports: | ||
- "3080:80" | ||
volumes: | ||
- ./Caddyfile:/etc/caddy/Caddyfile | ||
- explorer_caddy_data:/data | ||
|
||
volumes: | ||
explorer_caddy_data: |
Oops, something went wrong.
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.
I see no reason not to enable gzip compression.
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.
Is it necessary in a local-first, dev env?