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:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
volumes:
|
volumes:
|
||||||
- ./re2o/settings_local.py:./re2o/settings_local.py:ro
|
- ./re2o/settings_local.py:/code/re2o/settings_local.py:ro
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=postgres
|
- POSTGRES_DB=postgres
|
||||||
- POSTGRES_USER=postgres
|
- POSTGRES_USER=postgres
|
||||||
|
@ -37,5 +37,7 @@ services:
|
||||||
dockerfile: ./docker/Dockerfile-nginx
|
dockerfile: ./docker/Dockerfile-nginx
|
||||||
volumes:
|
volumes:
|
||||||
- ./media:/media
|
- ./media:/media
|
||||||
|
depends_on:
|
||||||
|
- re2o
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
|
@ -2,7 +2,7 @@ FROM python:3.9-bullseye AS build
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
RUN pip install poetry
|
RUN pip install poetry
|
||||||
WORKDIR /code
|
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/
|
COPY . /code/
|
||||||
RUN poetry install --extras "postgresql"
|
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
|
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
|
ENV PYTHONUNBUFFERED=1
|
||||||
RUN pip install poetry
|
RUN pip install poetry
|
||||||
WORKDIR /code
|
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/
|
COPY . /code/
|
||||||
CMD ./docker/docker-entrypoint.sh
|
CMD ./docker/docker-entrypoint.sh
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,20 @@ server {
|
||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
|
||||||
|
|
||||||
location /static {
|
location /static/ {
|
||||||
alias /static;
|
alias /static/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /javascript/bootstrap/ {
|
||||||
|
alias /static/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /javascript/jquery/ {
|
||||||
|
alias /static/admin/js/vendor/jquery/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/ {
|
location /media/ {
|
||||||
alias /media;
|
alias /media/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -20,7 +28,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_pass http://re2o:8000;
|
proxy_pass http://re2o:8000$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
Loading…
Reference in a new issue