-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #130 from JuniorJPDJ/master
feat(ci,Dockerfile,deps): add caching of build directories, add renovatebot config, pin dockerfile OS packages, update deps
- Loading branch information
Showing
10 changed files
with
189 additions
and
101 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
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 |
---|---|---|
|
@@ -74,6 +74,7 @@ chart/charts | |
|
||
# Database file | ||
uno.sqlite3 | ||
data/ | ||
|
||
images/api_auth.json | ||
images/sticker_config.json | ||
|
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,17 +1,27 @@ | ||
FROM python:3.11-alpine | ||
FROM python:3.11-alpine@sha256:700b4aa84090748aafb348fc042b5970abb0a73c8f1b4fcfe0f4e3c2a4a9fcca | ||
|
||
RUN apk add --no-cache gettext | ||
# renovate: datasource=repology depName=alpine_3_20/gettext versioning=loose | ||
ARG GETTEXT_VERSION="0.22.5-r0" | ||
|
||
WORKDIR /app/ | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
WORKDIR /app | ||
|
||
COPY . . | ||
ADD requirements.txt . | ||
|
||
RUN cd locales && find . -maxdepth 2 -type d -name 'LC_MESSAGES' -exec ash -c 'msgfmt {}/unobot.po -o {}/unobot.mo' \; | ||
RUN --mount=type=cache,sharing=locked,target=/root/.cache,id=home-cache-$TARGETPLATFORM \ | ||
apk add --no-cache \ | ||
gettext=${GETTEXT_VERSION} \ | ||
&& \ | ||
pip install -r requirements.txt && \ | ||
chown -R nobody:nogroup /app | ||
|
||
COPY --chown=nobody:nogroup . . | ||
|
||
VOLUME /app/data | ||
ENV UNO_DB /app/data/uno.sqlite3 | ||
USER nobody | ||
|
||
ENTRYPOINT python3 ./bot.py | ||
RUN cd locales && \ | ||
find . -maxdepth 2 -type d -name 'LC_MESSAGES' -exec ash -c 'msgfmt {}/unobot.po -o {}/unobot.mo' \; | ||
|
||
VOLUME /app/data | ||
ENV UNO_DB=/app/data/uno.sqlite3 | ||
|
||
ENTRYPOINT [ "python", "bot.py" ] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 3.0.0-beta4 | ||
digest: sha256:7b1303fd68b34ce69f2b6eb8a72a1e74f77636f906f2c1499234fc8f32aa4aac | ||
generated: "2024-03-11T03:47:29.800675883+01:00" | ||
version: 3.3.2 | ||
digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24 | ||
generated: "2024-08-18T12:14:16.193707111Z" |
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,8 +1,7 @@ | ||
version: "3.9" | ||
services: | ||
unobot: | ||
container_name: unobot | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
maumaubot: | ||
# build: . | ||
image: ghcr.io/jh0ker/mau_mau_bot | ||
restart: unless-stopped | ||
volumes: | ||
- ./data:/app/data |
Oops, something went wrong.