-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn fil-deal-ingestor into automated service (#26)
* Turn fil-deal-ingestor into automated service - Add dockerfile and fly config - Refactor run script to support running from docker container - Update .gitignore and add .dockerignore files * Add deployment docs; Remove fly cfg * Format readme and add comments to run.sh * Fix typo in run.sh Co-authored-by: Miroslav Bajtoš <[email protected]> * Add steps for updating machine to README * Apply suggestions from code review Co-authored-by: Julian Gruber <[email protected]> * Update README.md --------- Co-authored-by: Miroslav Bajtoš <[email protected]> Co-authored-by: Julian Gruber <[email protected]>
- Loading branch information
1 parent
25f8e97
commit 2147b22
Showing
5 changed files
with
103 additions
and
4 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,3 @@ | ||
node_modules | ||
generated | ||
target |
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 |
---|---|---|
|
@@ -139,3 +139,6 @@ generated/update-spark-db.sql | |
# Added by cargo | ||
|
||
/target | ||
|
||
# Added manually | ||
generated |
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,33 @@ | ||
# build rust binary from src | ||
FROM rust:1.79-slim AS builder | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY ./src ./src | ||
COPY ./Cargo.* . | ||
|
||
RUN cargo build --release | ||
|
||
# use node image to run the binary | ||
FROM node:22-slim AS runtime | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# install psql | ||
RUN apt-get update && apt-get install -y postgresql-client curl | ||
|
||
# copy built binary from builder | ||
COPY --from=builder /usr/src/app/target/release/fil-deal-ingester . | ||
|
||
# copy package.json and package-lock.lock | ||
COPY ./package.json . | ||
COPY ./package-lock.json . | ||
|
||
# copy scripts | ||
COPY ./scripts ./scripts | ||
COPY ./run.sh . | ||
|
||
# install node modules | ||
RUN npm install | ||
|
||
CMD ["./run.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