Commit 3ff351a5 authored by Zac Wood's avatar Zac Wood

Merge branch 'fix-statics' into 'v2.3'

run django's collectstatic to serve admin assets correctly

See merge request !134
parents 9793c71f 90f1fb49
Pipeline #4750 passed with stages
in 2 minutes
FROM python:3.7
ENV PYTHONUNBUFFERED 1
RUN apt-get update
RUN apt-get install netcat python3-dev default-libmysqlclient-dev -y
RUN mkdir /go
WORKDIR /go
ADD /requirements/ /go/
RUN pip install -r base.txt
ADD . /go/
RUN mkdir /static
version: '3.7'
services:
web:
build: .
# build: .
restart: always
ports:
- '8000:8000'
command: /bin/bash ./startup.sh -python go/manage.py runserver 0.0.0.0:8000
command: /bin/bash ./startup_prod.sh
image: go-prod
volumes:
- .:/go
depends_on:
......
......@@ -50,7 +50,7 @@ MEDIAFILES_DIRS = (
)
STATIC_URL = '/static/'
STATIC_ROOT = ''
STATIC_ROOT = '/static'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static/'),
)
......
......@@ -4,4 +4,5 @@ python go/manage.py makemigrations go
python go/manage.py migrate
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$GO_EMAIL_DOMAIN
echo "from django.contrib.auth import get_user_model; User = get_user_model(); me = User.objects.get(username='$superuser'); me.first_name = 'David'; me.last_name = 'Haynes'; me.save(); " | python go/manage.py shell
python go/manage.py collectstatic
python go/manage.py runserver 0.0.0.0:8000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment