Add the front-end docker-compose script (#283)

* Add the front-end docker-compose script

* Update the file content location

* fix typo

* Update the default nginx docker compose

* Add an online demo document
This commit is contained in:
Wu Clan
2024-02-03 20:41:41 +08:00
committed by GitHub
parent 7e633dbdd5
commit 2bad404913
4 changed files with 36 additions and 12 deletions
+23 -1
View File
@@ -76,6 +76,28 @@ services:
networks:
- fba_network
# # For use fastapi_best_architecture_ui, or online/pro env
# fba_ui:
# build:
# context: ⚠️ your fba_ui folder directory ⚠️
# dockerfile: Dockerfile
# ports:
# - "80:80"
# - "443:443"
# container_name: fba_ui
# restart: always
# depends_on:
# - fba_server
# command:
# - nginx
# - -g
# - daemon off;
# volumes:
# - fba_static:/www/fba_server/backend/app/static
# networks:
# - fba_network
# Good for server dev env
fba_nginx:
image: nginx
ports:
@@ -86,7 +108,7 @@ services:
- fba_server
volumes:
- ../nginx.conf:/etc/nginx/nginx.conf:ro
- fba_static:/www/fba/backend/app/static
- fba_static:/www/fba_server/backend/app/static
networks:
- fba_network
+3 -3
View File
@@ -35,7 +35,7 @@ http {
listen [::]:80 default_server;
server_name 127.0.0.1;
root /fba;
root /fba;
client_max_body_size 10m; # 最大上传文件
@@ -51,8 +51,8 @@ http {
proxy_read_timeout 300s;
}
location /static {
alias /www/fba/backend/app/static;
location /static/ {
alias /www/fba_server/backend/app/static;
}
}
}