Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit a759d8b

Browse files
authored
Merge pull request #216 from PyDrocsid/template
Merge Template
2 parents 27ee87a + 8960905 commit a759d8b

File tree

10 files changed

+90
-82
lines changed

10 files changed

+90
-82
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
**/.venv
12
.github
23
.dockerignore
34
*.env
45
.gitignore
56
docker-compose.yml
67
Dockerfile
78
.idea
8-
__pycache__
9+
**/__pycache__
910
README.md
1011
LICENSE

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
uses: docker/setup-qemu-action@v1.2.0
138138

139139
- name: Set up Docker Buildx
140-
uses: docker/setup-buildx-action@v1.6.0
140+
uses: docker/setup-buildx-action@v1.7.0
141141

142142
- name: Cache Docker layers
143143
uses: actions/cache@v3

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
path = bot/cogs/library
33
url = ../../PyDrocsid/cogs.git
44
branch = develop
5-
[submodule "bot/library"]
6-
path = bot/library
5+
[submodule "library"]
6+
path = library
77
url = ../../PyDrocsid/library.git
88
branch = develop

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ RUN pip install poetry
88

99
COPY pyproject.toml /build/
1010
COPY poetry.lock /build/
11+
COPY library /build/library
1112

1213
RUN set -ex \
14+
&& sed -i 's/develop = true/develop = false/' pyproject.toml poetry.lock \
1315
&& virtualenv .venv \
1416
&& . .venv/bin/activate \
1517
&& poetry install -n --no-root --no-dev
@@ -26,17 +28,19 @@ WORKDIR /app
2628
RUN set -x \
2729
&& apk add --no-cache libpq \
2830
&& addgroup -g 1000 bot \
29-
&& adduser -G bot -u 1000 -s /bin/bash -D -H bot \
31+
&& adduser -G bot -u 1000 -s /bin/sh -D -H bot \
3032
&& touch health && chown 1000:1000 health
3133

32-
USER bot
33-
3434
COPY --from=builder /build/.venv/lib /usr/local/lib
3535
COPY --from=builder /build/VERSION /app/
3636

3737
COPY config.yml /app/
3838
COPY bot /app/bot/
3939

40+
RUN pip uninstall -y pip setuptools
41+
42+
USER bot
43+
4044
HEALTHCHECK --interval=10s --timeout=5s --retries=1 \
4145
CMD sh -c 'test $(expr $(date +%s) - $(cat health)) -lt 30'
4246

bot/PyDrocsid

Lines changed: 0 additions & 1 deletion
This file was deleted.

bot/library

Lines changed: 0 additions & 1 deletion
This file was deleted.

library

Submodule library added at 86e0ccb

0 commit comments

Comments
 (0)