-
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.
- Loading branch information
Showing
6 changed files
with
66 additions
and
0 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 @@ | ||
name: Build DBT Runner Container | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'dbt/**' | ||
- 'dbt-container/**' | ||
|
||
jobs: | ||
build-and-deploy-container: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build container | ||
run: dbt-container/build.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM alpine:3.20 | ||
RUN apk upgrade --no-cache | ||
RUN apk --no-cache add bash | ||
|
||
WORKDIR /root/ | ||
COPY ./run.sh ./ | ||
COPY ./install.sh ./ | ||
RUN \ | ||
bash install.sh && \ | ||
rm install.sh | ||
|
||
ENTRYPOINT ["bash", "/root/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Kontin käynnistäminen | ||
``` | ||
docker run --rm --name dbt-runner ovara-dbt-runner | ||
``` |
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,4 @@ | ||
#!/bin/bash | ||
cd "${0%/*}" | ||
docker build --progress=plain -t ovara-dbt-runner . | ||
cd - |
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,19 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
case "$(uname -m)" in | ||
aarch64) ARCHITECTURE="arm64" ;; | ||
x86_64) ARCHITECTURE="amd64" ;; | ||
*) ARCHITECTURE=$(uname -m) ;; | ||
esac | ||
echo $ARCHITECTURE | ||
|
||
echo "Installing needed software" | ||
apk --no-cache add \ | ||
python3 | ||
|
||
ln -sf /usr/bin/python3 /usr/bin/python | ||
|
||
ls -Al /root | ||
cat /root/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Running Ovara DBT script..." | ||
|
||
exit 0 |