Skip to content

Commit 7bbd363

Browse files
committed
Rollback asgi changes, fix docker file run command
1 parent 7395822 commit 7bbd363

File tree

5 files changed

+103
-21
lines changed

5 files changed

+103
-21
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ LABEL maintainer="Penn Labs"
44

55
# Copy project files
66
COPY . /app/
7+
COPY ./scripts/mime.types /etc/mime.types
8+
COPY ./scripts/django-run /usr/local/bin/
79

810
WORKDIR /app
911
RUN uv sync --frozen
1012

1113
ENV DJANGO_SETTINGS_MODULE penncfa.settings.production
1214
ENV SECRET_KEY 'temporary key just to build the docker image'
13-
14-
COPY ./scripts/asgi-run /usr/local/bin/
15+
ENV PATH="/app/.venv/bin:$PATH"
1516

1617
# Collect static files
1718
RUN uv run /app/manage.py collectstatic --noinput
19+
CMD ["/usr/local/bin/django-run"]

penncfa/asgi.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/asgi-run

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/django-run

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Django Migrate
4+
uv run /app/manage.py migrate --noinput
5+
6+
# Switch to project folder
7+
cd /app/
8+
9+
# Run uwsgi
10+
uwsgi --ini ./setup.cfg --listen 1000

scripts/mime.types

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# mime type definitions copied from:
2+
# https://github.com/lucidfrontier45/docker-python-uwsgi/blob/master/mime.types
3+
4+
text/html html htm shtml
5+
text/css css
6+
text/xml xml
7+
image/gif gif
8+
image/jpeg jpeg jpg
9+
application/javascript js
10+
application/atom+xml atom
11+
application/rss+xml rss
12+
13+
text/mathml mml
14+
text/plain txt
15+
text/vnd.sun.j2me.app-descriptor jad
16+
text/vnd.wap.wml wml
17+
text/x-component htc
18+
19+
image/png png
20+
image/tiff tif tiff
21+
image/vnd.wap.wbmp wbmp
22+
image/x-icon ico
23+
image/x-jng jng
24+
image/x-ms-bmp bmp
25+
image/svg+xml svg svgz
26+
image/webp webp
27+
28+
application/font-woff woff
29+
application/java-archive jar war ear
30+
application/json json
31+
application/mac-binhex40 hqx
32+
application/msword doc
33+
application/pdf pdf
34+
application/postscript ps eps ai
35+
application/rtf rtf
36+
application/vnd.apple.mpegurl m3u8
37+
application/vnd.ms-excel xls
38+
application/vnd.ms-fontobject eot
39+
application/vnd.ms-powerpoint ppt
40+
application/vnd.wap.wmlc wmlc
41+
application/vnd.google-earth.kml+xml kml
42+
application/vnd.google-earth.kmz kmz
43+
application/x-7z-compressed 7z
44+
application/x-cocoa cco
45+
application/x-java-archive-diff jardiff
46+
application/x-java-jnlp-file jnlp
47+
application/x-makeself run
48+
application/x-perl pl pm
49+
application/x-pilot prc pdb
50+
application/x-rar-compressed rar
51+
application/x-redhat-package-manager rpm
52+
application/x-sea sea
53+
application/x-shockwave-flash swf
54+
application/x-stuffit sit
55+
application/x-tcl tcl tk
56+
application/x-x509-ca-cert der pem crt
57+
application/x-xpinstall xpi
58+
application/xhtml+xml xhtml
59+
application/xspf+xml xspf
60+
application/zip zip
61+
62+
application/octet-stream bin exe dll
63+
application/octet-stream deb
64+
application/octet-stream dmg
65+
application/octet-stream iso img
66+
application/octet-stream msi msp msm
67+
68+
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
69+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
70+
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
71+
72+
audio/midi mid midi kar
73+
audio/mpeg mp3
74+
audio/ogg ogg
75+
audio/x-m4a m4a
76+
audio/x-realaudio ra
77+
78+
video/3gpp 3gpp 3gp
79+
video/mp2t ts
80+
video/mp4 mp4
81+
video/mpeg mpeg mpg
82+
video/quicktime mov
83+
video/webm webm
84+
video/x-flv flv
85+
video/x-m4v m4v
86+
video/x-mng mng
87+
video/x-ms-asf asx asf
88+
video/x-ms-wmv wmv
89+
video/x-msvideo avi

0 commit comments

Comments
 (0)