Skip to content

Commit 1e3e9ea

Browse files
authored
Update docker scripts and nginx conf (#542)
1 parent 5b42e59 commit 1e3e9ea

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

backend/Dockerfile Dockerfile

File renamed without changes.

backend/README.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
## Docker
44

5-
> [!IMPORTANT]
6-
> Due to Docker context limitations, you can't build an image in this directory
7-
85
1. Make sure you're at the root of the project
96
2. 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

1512
3. Start container
@@ -39,9 +36,7 @@
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

4742
3. Checkout a new branch and make your changes

deploy/backend/nginx.conf

+2-2
Original file line numberDiff line numberDiff 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
}

deploy/backend/docker-compose/docker-compose.yml docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
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

0 commit comments

Comments
 (0)