summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorYulqen <246857+yulqen@users.noreply.github.com>2024-06-05 16:38:47 +0100
committerGitHub <noreply@github.com>2024-06-05 16:38:47 +0100
commit1aa13bfb45d1f9c06ea407f25fd4a416b879e164 (patch)
tree3aef1cf752507239c4dbdeb6d5bad9d20ce997ac /Dockerfile
parentb0d9d60933882b57517ebddc5b7f81bcac953adc (diff)
parent1407ed37666d60bb27f964feeabadb8f5ca07cd8 (diff)
Merge pull request #81 from defencedigital/postgres-migration
Experiment with putting collectstatic and superuser in initial build
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 20b1caf..096ddb0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,11 +14,13 @@ COPY . /app
ENV DJANGO_SETTINGS_MODULE=conf.settings.prod
+RUN mkdir -p /app/static/css /app/static/js /app/static/img
+
# Install Python dependencies
RUN pip install -U "pip>=24.0.0" && \
- pip install -r requirements.txt
-
-RUN mkdir -p /app/static/css /app/static/js /app/static/img
+ pip install -r requirements.txt && \
+ python manage.py collectstatic --noinput && \
+ python manage.py createsuperuser --noinput
# Switch to non-root user
USER 1001