File tree 4 files changed +10
-15
lines changed
4 files changed +10
-15
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 2
2
3
3
## Docker
4
4
5
- > [ !IMPORTANT]
6
- > Due to Docker context limitations, you can't build an image in this directory
7
-
8
5
1 . Make sure you're at the root of the project
9
6
2 . Run the following Docker command to build container:
10
7
11
8
``` shell
12
- docker build -f backend/ Dockerfile -t fba_backend_independent .
9
+ docker build -f Dockerfile -t fba_backend_independent .
13
10
```
14
11
15
12
3 . Start container
39
36
40
37
cd fastapi_best_architecture/backend
41
38
42
- uv venv
43
-
44
- uv pip install -r requirements.txt
39
+ uv sync --frozen
45
40
```
46
41
47
42
3 . Checkout a new branch and make your changes
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ server {
46
46
}
47
47
48
48
location /static {
49
- alias /www/fba_server/backend/static;
49
+ alias /var/ www/fba_server/backend/static;
50
50
}
51
51
52
52
location /static/upload {
53
- alias /www/fba_server/backend/static/upload;
53
+ alias /var/ www/fba_server/backend/static/upload;
54
54
}
55
55
}
Original file line number Diff line number Diff line change 1
1
services :
2
2
fba_server :
3
3
build :
4
- context : ../../../
5
- dockerfile : backend/ Dockerfile
4
+ context : .
5
+ dockerfile : Dockerfile
6
6
image : fba_server:latest
7
7
container_name : fba_server
8
8
restart : always
@@ -11,7 +11,7 @@ services:
11
11
- fba_redis
12
12
- fba_celery
13
13
volumes :
14
- - .env.server:/fba/backend/.env
14
+ - ./deploy/backend/docker-compose/. env.server:/fba/backend/.env
15
15
- fba_static:/fba/backend/app/static
16
16
networks :
17
17
- fba_network
@@ -80,7 +80,7 @@ services:
80
80
depends_on :
81
81
- fba_server
82
82
volumes :
83
- - .. /nginx.conf:/etc/nginx/conf.d/default.conf:ro
83
+ - ./deploy/backend /nginx.conf:/etc/nginx/conf.d/default.conf:ro
84
84
- fba_static:/www/fba_server/backend/static
85
85
- fba_static_upload:/www/fba_server/backend/static/upload
86
86
networks :
@@ -127,8 +127,8 @@ services:
127
127
128
128
fba_celery :
129
129
build :
130
- context : ../../../
131
- dockerfile : backend/ Dockerfile
130
+ context : .
131
+ dockerfile : Dockerfile
132
132
args :
133
133
- SERVER_TYPE=celery
134
134
image : fba_celery:latest
You can’t perform that action at this time.
0 commit comments