-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (57 loc) · 1.2 KB
/
docker-compose.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: "3.9"
services:
upi_db:
image: postgres:15
container_name: upi_postgres
volumes:
- ~/.pg/pg_data/upi:/var/lib/postgresql/data
env_file:
- .env
upi_project:
build:
dockerfile: Dockerfile
context: .
#image: upi
container_name: upi_django
depends_on:
- upi_db
volumes:
- static_volume:/upi/static
- media_volume:/upi/media
env_file:
- .env
command: >
bash -c "python manage.py collectstatic --noinput && python manage.py migrate && gunicorn -b 0.0.0.0:8000 upi.wsgi"
nginx:
build:
dockerfile: ./Dockerfile
context: ./docker/nginx/
container_name: upi_nginx
image: upi_nginx
volumes:
- static_volume:/upi/static
- media_volume:/upi/media
depends_on:
- upi_project
ports:
- "${NGINX_EXTERNAL_PORT}:80"
redis:
image: redis:latest
container_name: redis
restart: always
expose:
- 6379
celery:
build:
context: .
dockerfile: Dockerfile
#image: upi
container_name: celery
env_file:
- .env
command: celery -A upi beat -l info
depends_on:
- redis
volumes:
static_volume:
media_volume: