Skip to content

Commit 2bda49d

Browse files
committed
Official docker file
1 parent 5dc4b5c commit 2bda49d

3 files changed

Lines changed: 66 additions & 12 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ data/
1111
# Temp files
1212
*.tmp
1313

14+
# Docker config folder
15+
config/
16+
1417
# Backup files #
1518
*.bak
1619
*_bak/
@@ -118,4 +121,4 @@ GitHub.sublime-settings
118121
%SystemDrive%
119122

120123
# Mac file system
121-
.DS_Store/
124+
.DS_Store/

.vscode/settings.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
{
22
"editor.detectIndentation": false,
33
"editor.formatOnSave": true,
4-
"python.linting.pylintEnabled": true,
5-
"python.linting.pylintUseMinimalCheckers": false,
6-
"python.linting.pylintArgs": [],
74
"python.languageServer": "Pylance",
8-
"python.analysis.typeCheckingMode": "off",
9-
"python.formatting.provider": "black",
10-
"python.sortImports.args": [
11-
"--src=${workspaceFolder}"
12-
],
13-
"terminal.integrated.scrollback": 20000,
5+
"terminal.integrated.scrollback": 2000,
146
"git.autofetch": true,
157
"prettier.tabWidth": 4,
168
"prettier.useTabs": true,
@@ -32,6 +24,6 @@
3224
"editor.defaultFormatter": "esbenp.prettier-vscode"
3325
},
3426
"[python]": {
35-
"editor.defaultFormatter": "ms-python.python"
27+
"editor.defaultFormatter": "charliermarsh.ruff"
3628
},
37-
}
29+
}

Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# FROM ghcr.io/linuxserver/baseimage-alpine:3.20
2+
FROM python:3.11.9-alpine3.20
3+
4+
ENV DATA_DIR=/config DEBUG=False
5+
6+
COPY ./manage.py /app/manage.py
7+
COPY ./VERSION /app/VERSION
8+
COPY ./LICENSE /app/LICENSE
9+
COPY ./conreq/ /app/conreq/
10+
COPY ./requirements/ /app/conreq/requirements/
11+
12+
RUN \
13+
echo "**** Install build dependencies ****" \
14+
&& \
15+
apk add --no-cache --virtual=build-dependencies \
16+
bsd-compat-headers \
17+
build-base \
18+
cargo \
19+
curl \
20+
g++ \
21+
gcc \
22+
git \
23+
jq \
24+
libev-dev \
25+
libffi-dev \
26+
openssl-dev \
27+
&& \
28+
echo "**** Install Linux packages ****" \
29+
&& \
30+
apk add --no-cache \
31+
freetype-dev \
32+
fribidi-dev \
33+
harfbuzz-dev \
34+
jpeg-dev \
35+
lcms2-dev \
36+
openjpeg-dev \
37+
tcl-dev \
38+
tiff-dev \
39+
tk-dev \
40+
zlib-dev \
41+
&& \
42+
echo "**** Install Python dependencies ****" \
43+
&& \
44+
pip3 install --no-cache-dir -U -r /app/conreq/requirements/main.txt \
45+
&& \
46+
echo "**** Cleanup ****" \
47+
&& \
48+
apk del --purge \
49+
build-dependencies \
50+
&& \
51+
rm -rf \
52+
/root/.cache \
53+
/root/.cargo \
54+
/tmp/*
55+
56+
EXPOSE 8000
57+
58+
WORKDIR /app/
59+
CMD ["sh", "-c", "python3 manage.py run_conreq --uid ${PUID:=1000} --gid ${PGID:=1000}"]

0 commit comments

Comments
 (0)