File tree 4 files changed +20
-12
lines changed
4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
1
** /*
2
2
3
- ! /src /** /* .py
3
+ ! /src /
4
+ ! /accents /* .py
4
5
! /uv.lock
5
6
! /pyproject.toml
6
- ! /accents
7
7
! /accents2 /
8
8
! /schema.sql
9
+
10
+ ** /__pycache__ /
11
+ ** /* .egg-info
Original file line number Diff line number Diff line change @@ -15,18 +15,17 @@ ENV PYTHONUNBUFFERED=yes \
15
15
16
16
WORKDIR /code
17
17
18
- COPY --from=ghcr.io/astral-sh/uv:0.3.3 /uv /bin/uv
19
- COPY uv.lock .
20
- COPY pyproject.toml .
18
+ COPY --from=ghcr.io/astral-sh/uv:0.3.5 /uv /bin/uv
19
+ COPY uv.lock pyproject.toml .
21
20
22
- RUN : \
21
+ RUN --mount=type=cache,target=/root/.cache/uv : \
23
22
&& apk add --no-cache \
24
23
# gif optimizer
25
24
gifsicle \
26
25
# Font for trocr
27
26
ttf-dejavu \
28
- && uv sync --frozen --no-cache --no-dev \
29
- && rm /bin/uv
27
+ && uv sync --frozen --no-dev --link-mode=copy \
28
+ && rm /bin/uv pyproject.toml uv.lock
30
29
31
30
COPY --from=accents_builder /build/target/release/sayit /usr/bin/sayit
32
31
@@ -46,7 +45,9 @@ RUN addgroup -g $GID -S pink \
46
45
47
46
USER pink
48
47
49
- COPY --chown=pink:pink . .
50
- RUN rm uv.lock pyproject.toml
48
+ COPY --chown=pink:pink src src
49
+ COPY --chown=pink:pink accents2/examples accents2/examples
50
+ COPY --chown=pink:pink accents accents
51
+ COPY --chown=pink:pink schema.sql .
51
52
52
53
ENTRYPOINT ["/code/.venv/bin/python" , "-m" , "src" ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ This is a personal discord bot that has a few commands related to Unitystation.
9
9
Rough instructions:
10
10
11
11
Building podman/docker image: ` podman build . -t fogapod/pink ` (no tricks)
12
- Running podman/docker image: ` podman run --rm --name pink -v $(pwd)/settings.toml:/code/settings.toml -v $(pwd)/pink.db:/code /pink.db fogapod/pink `
12
+ Running podman/docker image: ` podman run --rm --name pink -v $(pwd)/settings.toml:/code/settings.toml -v $(pwd)/pink.db:/data /pink.db fogapod/pink `
13
13
14
14
Running on production:
15
15
Original file line number Diff line number Diff line change 2
2
name = " PINK"
3
3
version = " 0.1.0"
4
4
description = " Potato Is Not Kiwi"
5
- readme = " README.md"
6
5
requires-python = " ==3.12.*"
7
6
dependencies = [
8
7
" discord-py[speed]>=2.0" ,
@@ -17,6 +16,11 @@ dependencies = [
17
16
" yarl>=1.9.4" ,
18
17
]
19
18
19
+ # a way to have virtual package until https://github.com/astral-sh/uv/pull/6585
20
+ # is released
21
+ [tool .uv .workspace ]
22
+ members = []
23
+
20
24
[tool .uv ]
21
25
dev-dependencies = [
22
26
" mypy>=1.11.2" ,
You can’t perform that action at this time.
0 commit comments