forked from esamarathon/donation-tracker-toplevel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
95 lines (76 loc) · 2.42 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM node:20 AS client
WORKDIR /app
COPY ./tracker/package.json ./tracker/yarn.lock ./
COPY \
./tracker/.browserslistrc \
./tracker/karma.conf.js \
./tracker/declarations.d.ts \
./tracker/postcss.config.js \
./tracker/prettier.config.js \
./tracker/tsconfig.json \
./tracker/.yarnrc.yml \
./tracker/webpack.config.js \
./
COPY ./tracker/bundles bundles
COPY ./tracker/design design
COPY ./tracker/tracker tracker
COPY ./tracker/.yarn .yarn
RUN corepack enable
RUN yarn install
RUN yarn build
FROM python:3.12
WORKDIR /app
RUN pip install django~=5.0
RUN django-admin startproject tracker_development
WORKDIR /app/tracker_development/donation-tracker
COPY \
./tracker/__init__.py \
./tracker/.flake8 \
./tracker/pyproject.toml \
./tracker/README.md \
./tracker/setup.py \
./tracker/.browserslistrc \
./tracker/karma.conf.js \
./tracker/declarations.d.ts \
./tracker/postcss.config.js \
./tracker/prettier.config.js \
./tracker/tsconfig.json \
./tracker/.yarnrc.yml \
./tracker/package.json \
./tracker/yarn.lock \
./tracker/webpack.config.js \
./
COPY ./tracker/bundles bundles
COPY ./tracker/design design
COPY ./tracker/.yarn .yarn
COPY --from=client /app/tracker/ tracker
COPY ./tracker/tracker tracker
COPY ./tracker/setup.py ./
RUN pip install daphne
# We need edit mode for some reason, or the templates don't get compiled in properly
# Likely something about this setup but at least it works
RUN pip install -e .
WORKDIR /app/tracker_development
COPY ./settings.py ./wsgi.py ./asgi.py ./local_statics.py ./routing.py ./urls.py /app/tracker_development/tracker_development/
COPY ./entrypoint.sh ./
RUN mkdir db
RUN apt update
RUN apt install -y locales
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "nl_NL.UTF-8 UTF-8" >> /etc/locale.gen
RUN locale-gen en_US.UTF-8
RUN locale-gen en_GB.UTF-8
RUN locale-gen nl_NL.UTF-8
#ENV LC_ALL en_US.UTF-8
ENV LC_ALL nl_NL.UTF-8
RUN mkdir -p /var/www/html/static
RUN python manage.py collectstatic --noinput
COPY ./fonts /var/www/html/fonts
#RUN ["python", "manage.py", "migrate"]
#RUN ["python", "manage.py", "loaddata", "blank.json"]
#ARG superusername=admin
#ARG superuserpassword=password
#RUN python manage.py createsuperuser --noinput --email [email protected] --username ${superusername}
#RUN yes ${superuserpassword} | python manage.py changepassword ${superusername}
ENTRYPOINT ./entrypoint.sh