-
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.
build: 👷 Include Docker deployment options - Forager can now be deplo…
…yed with a Docker image
- Loading branch information
1 parent
f2d92e5
commit 68ed2d7
Showing
5 changed files
with
36 additions
and
22 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,5 @@ | ||
--- | ||
"forager": patch | ||
--- | ||
|
||
Include Docker deployment options - Forager can now be deployed with a Docker image |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
FROM node:18.12.1 | ||
FROM alpine:latest | ||
|
||
LABEL author="Craig Broughton" | ||
LABEL author.email="[email protected]" | ||
ARG FORAGER_VERSION=2.0.0 | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache \ | ||
unzip \ | ||
ca-certificates | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
# download and unzip Forager | ||
ADD https://github.com/CRBroughton/forager/releases/download/${FORAGER_VERSION}/forager-${FORAGER_VERSION}-linux.zip /tmp/forager.zip | ||
|
||
ADD . . | ||
RUN unzip /tmp/forager.zip -d forager | ||
RUN cd forager && mv forager-${FORAGER_VERSION}-linux forager | ||
RUN rm -rf /tmp/forager/zip | ||
|
||
RUN npm i -g pnpm && pnpm i | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
EXPOSE 4000 | ||
|
||
CMD ["npm", "run", "dev"] | ||
# start Forager | ||
CMD ["forager/forager", "serve", "--http=0.0.0.0:8090"] |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
version: '3.8' | ||
version: "3.8" | ||
|
||
services: | ||
ui: | ||
container_name: vite-ui | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
forager: | ||
build: . | ||
container_name: forager | ||
environment: | ||
- PUID=1000 | ||
- PGID=1000 | ||
volumes: | ||
- ./:/app | ||
- ./node_modules:/app/node_modules | ||
- forager:/pb/pb_data | ||
ports: | ||
- '4000:4000' | ||
- 8090:8090 | ||
restart: unless-stopped |
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