Nginx не сохраняет меди файлы
Запускаю проект из контейнера и тестирую медиа файлы,в контейнере приложения все сохраняется,но в контейнере nginx нет конфиг nginx
server {
listen 80;
server_name 38.180.37.241;
location /static/ {
alias /staticfiles/;
}
location /media/ {
alias /media/;
}
location / {
proxy_pass http://nic_astrawood:8000/;
proxy_set_header Host $host;
}
}
Docker compsoe:
services:
db:
image: postgres:15
restart: always
container_name: NIC_astrawoood_db
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_HOST=db
env_file:
- .env
networks:
- nic_astrawood_network
nic_astrawood:
build:
context:
.
dockerfile: Dockerfile
restart: always
container_name: nic_astrawood
expose:
- 8000
ports:
- "8000:8000"
depends_on:
- db
environment:
- POSTGRES_HOST=db
env_file:
- .env
volumes:
- ./backend_api/staticfiles:/staticfiles
- media_volume:/media
networks:
- nic_astrawood_network
nginx:
image: nginx:latest
restart: always
container_name: nic_astrawood-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./backend_api/staticfiles:/staticfiles
- ./nginx/conf.d:/etc/nginx/conf.d
- media_volume:/media
depends_on:
- nic_astrawood
networks:
- nic_astrawood_network
networks:
nic_astrawood_network:
driver: bridge
volumes:
postgres_data:
media_volume: