mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-22 23:13:46 +00:00
Fix static issues when no CDN is used
This commit is contained in:
parent
6bf31bd5c3
commit
4df043d730
4 changed files with 17 additions and 7 deletions
|
@ -22,7 +22,7 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./re2o/settings_local.py:./re2o/settings_local.py:ro
|
||||
- ./re2o/settings_local.py:/code/re2o/settings_local.py:ro
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- POSTGRES_USER=postgres
|
||||
|
@ -37,5 +37,7 @@ services:
|
|||
dockerfile: ./docker/Dockerfile-nginx
|
||||
volumes:
|
||||
- ./media:/media
|
||||
depends_on:
|
||||
- re2o
|
||||
ports:
|
||||
- "80:80"
|
|
@ -2,7 +2,7 @@ FROM python:3.9-bullseye AS build
|
|||
ENV PYTHONUNBUFFERED=1
|
||||
RUN pip install poetry
|
||||
WORKDIR /code
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base gettext libpq-dev
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base gettext libpq-dev fonts-font-awesome libjs-bootstrap libjs-jquery
|
||||
COPY . /code/
|
||||
RUN poetry install --extras "postgresql"
|
||||
ENV POSTGRES_DB=postgres POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres SUPERUSER_LOGIN=admin SUPERUSER_PASS=admin SUPERUSER_EMAIL=admin@example.net ENV=dev
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM python:3.9-bullseye AS base
|
|||
ENV PYTHONUNBUFFERED=1
|
||||
RUN pip install poetry
|
||||
WORKDIR /code
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base gettext libpq-dev graphviz
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base gettext libpq-dev graphviz fonts-font-awesome libjs-bootstrap libjs-jquery
|
||||
COPY . /code/
|
||||
CMD ./docker/docker-entrypoint.sh
|
||||
|
||||
|
|
|
@ -7,12 +7,20 @@ server {
|
|||
keepalive_timeout 5;
|
||||
|
||||
|
||||
location /static {
|
||||
alias /static;
|
||||
location /static/ {
|
||||
alias /static/;
|
||||
}
|
||||
|
||||
location /javascript/bootstrap/ {
|
||||
alias /static/;
|
||||
}
|
||||
|
||||
location /javascript/jquery/ {
|
||||
alias /static/admin/js/vendor/jquery/;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /media;
|
||||
alias /media/;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
@ -20,7 +28,7 @@ server {
|
|||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://re2o:8000;
|
||||
proxy_pass http://re2o:8000$request_uri;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
|
Loading…
Reference in a new issue