Fix: nginx access BE static
This commit is contained in:
parent
1a9b8bf023
commit
f276847f43
@ -10,12 +10,15 @@ server {
|
|||||||
proxy_pass {{proxy_server}};
|
proxy_pass {{proxy_server}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /static/drf_spectacular_sidecar/ {
|
||||||
|
alias /backend-static/drf_spectacular_sidecar/;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
try_files $uri /index.html;
|
try_files $uri /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
#error_page 404 /404.html;
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
# redirect server error pages to the static page /50x.html
|
||||||
|
@ -40,7 +40,7 @@ services:
|
|||||||
context: cope2n-api
|
context: cope2n-api
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 9886:9000
|
- 9880:9000
|
||||||
image: sidp/cope2n-be-fi-sbt
|
image: sidp/cope2n-be-fi-sbt
|
||||||
container_name: "sidp-cope2n-be-ctel-manulife-sbt"
|
container_name: "sidp-cope2n-be-ctel-manulife-sbt"
|
||||||
environment:
|
environment:
|
||||||
@ -75,6 +75,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
||||||
- ./cope2n-api:/app
|
- ./cope2n-api:/app
|
||||||
|
- BE_static:/app/static
|
||||||
# - sqlite_data:/app/
|
# - sqlite_data:/app/
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
# depends_on:
|
# depends_on:
|
||||||
@ -177,6 +178,29 @@ services:
|
|||||||
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
|
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
|
||||||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
||||||
# Front-end services
|
# Front-end services
|
||||||
|
fe-sbt:
|
||||||
|
build:
|
||||||
|
context: cope2n-fe
|
||||||
|
shm_size: 10gb
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
shm_size: 10gb
|
||||||
|
image: sidp/cope2n-fe-fi-sbt
|
||||||
|
container_name: "sidp-cope2n-fe-ctel-sbt"
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- 9881:80
|
||||||
|
depends_on:
|
||||||
|
be-ctel-manulife-sbt:
|
||||||
|
condition: service_started
|
||||||
|
be-celery-manulife-sbt:
|
||||||
|
condition: service_started
|
||||||
|
environment:
|
||||||
|
# - VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
|
||||||
|
- VITE_PROXY=http://42.96.42.13:9880
|
||||||
|
- VITE_API_BASE_URL=http://fe-sbt:80
|
||||||
|
volumes:
|
||||||
|
- BE_static:/backend-static
|
||||||
|
# Front-end services
|
||||||
fe:
|
fe:
|
||||||
build:
|
build:
|
||||||
context: cope2n-fe
|
context: cope2n-fe
|
||||||
@ -190,6 +214,7 @@ services:
|
|||||||
- 9882:80
|
- 9882:80
|
||||||
environment:
|
environment:
|
||||||
- VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
|
- VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
|
||||||
|
# - VITE_PROXY=http://42.96.42.13:9880
|
||||||
- VITE_API_BASE_URL=http://fe:80
|
- VITE_API_BASE_URL=http://fe:80
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
@ -198,3 +223,4 @@ volumes:
|
|||||||
db_data:
|
db_data:
|
||||||
rabbitmq_data:
|
rabbitmq_data:
|
||||||
sqlite_data:
|
sqlite_data:
|
||||||
|
BE_static:
|
Loading…
Reference in New Issue
Block a user