File tree Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Expand file tree Collapse file tree 4 files changed +10
-15
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 22
33## Docker
44
5- > [ !IMPORTANT]
6- > Due to Docker context limitations, you can't build an image in this directory
7-
851 . Make sure you're at the root of the project
962 . Run the following Docker command to build container:
107
118 ``` shell
12- docker build -f backend/ Dockerfile -t fba_backend_independent .
9+ docker build -f Dockerfile -t fba_backend_independent .
1310 ```
1411
15123 . Start container
3936
4037 cd fastapi_best_architecture/backend
4138
42- uv venv
43-
44- uv pip install -r requirements.txt
39+ uv sync --frozen
4540 ```
4641
47423 . Checkout a new branch and make your changes
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ server {
4646 }
4747
4848 location /static {
49- alias /www/fba_server/backend/static;
49+ alias /var/ www/fba_server/backend/static;
5050 }
5151
5252 location /static/upload {
53- alias /www/fba_server/backend/static/upload;
53+ alias /var/ www/fba_server/backend/static/upload;
5454 }
5555}
Original file line number Diff line number Diff line change 11services :
22 fba_server :
33 build :
4- context : ../../../
5- dockerfile : backend/ Dockerfile
4+ context : .
5+ dockerfile : Dockerfile
66 image : fba_server:latest
77 container_name : fba_server
88 restart : always
@@ -11,7 +11,7 @@ services:
1111 - fba_redis
1212 - fba_celery
1313 volumes :
14- - .env.server:/fba/backend/.env
14+ - ./deploy/backend/docker-compose/. env.server:/fba/backend/.env
1515 - fba_static:/fba/backend/app/static
1616 networks :
1717 - fba_network
@@ -80,7 +80,7 @@ services:
8080 depends_on :
8181 - fba_server
8282 volumes :
83- - .. /nginx.conf:/etc/nginx/conf.d/default.conf:ro
83+ - ./deploy/backend /nginx.conf:/etc/nginx/conf.d/default.conf:ro
8484 - fba_static:/www/fba_server/backend/static
8585 - fba_static_upload:/www/fba_server/backend/static/upload
8686 networks :
@@ -127,8 +127,8 @@ services:
127127
128128 fba_celery :
129129 build :
130- context : ../../../
131- dockerfile : backend/ Dockerfile
130+ context : .
131+ dockerfile : Dockerfile
132132 args :
133133 - SERVER_TYPE=celery
134134 image : fba_celery:latest
You can’t perform that action at this time.
0 commit comments