Skip to content

Commit 4bc891b

Browse files
author
Dawid Ciepiela
committed
decrypt for build
1 parent 6589686 commit 4bc891b

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.gitattributes !filter !diff
2-
config.env filter=git-crypt diff=git-crypts
2+
config.env filter=git-crypt diff=git-crypt

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24+
- name: Install git-crypt and decrypt repository
25+
env:
26+
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
27+
run: |
28+
sudo apt-get update && \
29+
sudo apt-get install -y git-crypt && \
30+
echo "$GIT_CRYPT_KEY" | base64 -d | git-crypt unlock - && \
31+
git-crypt status -e
32+
2433
- name: Deploy to Heroku
2534
uses: akhileshns/heroku-deploy@v3.13.15
2635
with:

Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ RUN python -m pip install --no-cache-dir -U pip wheel
66

77
COPY ./requirements.txt /tmp/
88

9-
RUN python -OO -m pip wheel --no-cache-dir --wheel-dir=/tmp/wheels -r /tmp/requirements.txt
9+
RUN python -OO -m pip wheel --no-cache-dir --wheel-dir=/tmp/wheels -r /tmp/requirements.txt
1010

1111
FROM base
12-
COPY --from=builder /tmp/wheels /tmp/wheels
1312

14-
RUN python -m pip install --no-cache --no-index /tmp/wheels/* && \
15-
rm -rf /tmp/wheels && \
16-
mkdir -p /app/src/
13+
COPY --from=builder /tmp/wheels /tmp/wheels
1714

1815
ADD ./src /app/src
1916
ADD ./config.env /app/config.env
2017

21-
CMD APP_RUN_MODE=PROD python -OO -B /app/src/main.py
18+
WORKDIR /app/src
19+
20+
RUN python -m pip install --no-cache --no-index /tmp/wheels/* && \
21+
rm -rf /tmp/wheels
22+
23+
ENV APP_RUN_MODE=PROD
24+
ENTRYPOINT [ "python" ]
25+
CMD [ "-OO", "-B" ,"main.py" ]

0 commit comments

Comments
 (0)