-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.67 KB
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
61
62
63
64
65
66
67
68
69
# we want to create a container for django+celery and postgres
version: "3"
services:
database:
container_name: tenant1_database
restart: always
image: postgres:13.6-alpine
networks:
- tenant1_network
environment:
- POSTGRES_DB=tenant1
- POSTGRES_USER=tenant1
- POSTGRES_PASSWORD=tenant1
volumes:
- tenant1_data:/var/lib/postgresql/data
backend:
container_name: tenant1_backend
build:
context: .
dockerfile: dockerfile
volumes:
- static_volume:/app/core/django_static
entrypoint: /app/server-entrypoint.sh
expose:
- 8000
depends_on:
- database
networks:
- tenant1_network
# environment:
# DEBUG: "True"
# CELERY_BROKER_URL: "redis://redis:6379/0"
# CELERY_RESULT_BACKEND: "redis://redis:6379/0"
# DJANGO_DB: postgresql
# POSTGRES_HOST: db
# POSTGRES_NAME: postgres
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_PORT: 5432
worker:
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
entrypoint: /app/celery-worker-entrypoint.sh
volumes:
- static_volume:/app/core/django_static
# environment:
# DEBUG: "True"
# CELERY_BROKER_URL: "redis://redis:6379/0"
# CELERY_RESULT_BACKEND: "redis://redis:6379/0"
# DJANGO_DB: postgresql
# POSTGRES_HOST: db
# POSTGRES_NAME: postgres
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_PORT: 5432
depends_on:
- backend
volumes:
tenant1_data:
static_volume:
networks:
tenant1_network:
driver: bridge