-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.dev.yml
127 lines (116 loc) · 2.78 KB
/
docker-compose.dev.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: "3"
services:
app:
build: .
environment: &django_env
DEBUG: 1
REDIS_URL: redis://redis:6379
RABBITMQ_URL: amqp://posthog:posthog@rabbitmq:5672
DATABASE_URL: postgres://housewatch:housewatch@db:5432/housewatch
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_DATABASE: default
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_CLUSTER: housewatch
CLICKHOUSE_SECURE: false
CLICKHOUSE_VERIFY: false
CLICKHOUSE_CA: ""
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
command:
- bash
- -c
- |
python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- .:/code
depends_on:
migrations:
condition: service_completed_successfully
clickhouse:
condition: service_started
db:
condition: service_healthy
redis:
condition: service_started
rabbitmq:
condition: service_started
migrations:
build: .
environment: *django_env
command: python manage.py migrate
depends_on:
db:
condition: service_healthy
volumes:
- .:/code
web:
build:
context: ./frontend
dockerfile: Dockerfile.dev
caddy:
image: caddy:2.6.1
restart: unless-stopped
ports:
- "8080:8080"
- "443:443"
environment:
SITE_ADDRESS: ":8080"
volumes:
- ./docker/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- web
- app
db:
image: postgres:16-alpine
restart: on-failure
environment:
POSTGRES_USER: housewatch
POSTGRES_DB: housewatch
POSTGRES_PASSWORD: housewatch
healthcheck:
test: ["CMD-SHELL", "pg_isready -U housewatch"]
interval: 5s
timeout: 5s
ports:
- "5432:5432"
redis:
image: redis:6.2.7-alpine
restart: on-failure
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb
worker:
build: .
environment:
<<: *django_env
command:
- ./bin/celery
volumes:
- .:/code
depends_on:
- clickhouse
- db
- redis
- rabbitmq
clickhouse:
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.12.5}
restart: on-failure
depends_on:
- zookeeper
volumes:
- ./docker/clickhouse-server/config.d:/etc/clickhouse-server/config.d
ports:
- "8123:8123"
zookeeper:
image: zookeeper:3.7.0
restart: on-failure
rabbitmq:
image: rabbitmq:3.12.2-management-alpine
ports:
- "15672:15672" # Web management UI
- "5672:5672" # Default RabbitMQ broker port
environment:
RABBITMQ_DEFAULT_USER: posthog
RABBITMQ_DEFAULT_PASS: posthog