mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 21:15:13 +00:00
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:
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user