forked from koladev32/Full-stack-Django-and-React
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
41 lines (39 loc) · 850 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: '3.8'
services:
redis:
image: redis:alpine
nginx:
container_name: postagram_web
restart: on-failure
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- uploads_volume:/app/uploads
ports:
- "80:80"
depends_on:
- api
api:
container_name: postagram_api
build: .
restart: always
env_file: .env
ports:
- "8000:8000"
command: >
sh -c "python manage.py migrate --no-input && gunicorn CoreRoot.wsgi:application --bind 0.0.0.0:8000"
volumes:
- .:/app
- uploads_volume:/app/uploads
depends_on:
- db
- redis
db:
container_name: postagram_db
image: postgres:14.3-alpine
env_file: .env
volumes:
- postgres_data:/var/lib/postgresql/data/
volumes:
uploads_volume:
postgres_data: