-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.yml
93 lines (85 loc) · 2.06 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
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
version: "3"
services:
app:
build: .
environment: &django_env
DATABASE_URL: postgres://housewatch:housewatch@db:5432/housewatch
RABBITMQ_URL: amqp://posthog:posthog@rabbitmq:5672
REDIS_URL: redis://redis:6379
CLICKHOUSE_HOST: $CLICKHOUSE_HOST
CLICKHOUSE_DATABASE: $CLICKHOUSE_DATABASE
CLICKHOUSE_USER: $CLICKHOUSE_USER
CLICKHOUSE_PASSWORD: $CLICKHOUSE_PASSWORD
CLICKHOUSE_CLUSTER: $CLICKHOUSE_CLUSTER
CLICKHOUSE_SECURE: $CLICKHOUSE_SECURE
CLICKHOUSE_VERIFY: $CLICKHOUSE_VERIFY
CLICKHOUSE_CA: $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 migrate
python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
- redis
- rabbitmq
- clickhouse
web:
build: ./frontend
ports:
- "3000:3000"
worker:
build: .
environment:
<<: *django_env
command:
- ./bin/celery
volumes:
- .:/code
depends_on:
- db
- redis
- rabbitmq
- clickhouse
redis:
image: redis:6.2.7-alpine
restart: on-failure
ports:
- "6388:6379"
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb
db:
image: postgres:14-alpine
restart: on-failure
environment:
POSTGRES_USER: housewatch
POSTGRES_DB: housewatch
POSTGRES_PASSWORD: housewatch
caddy:
image: caddy:2.6.1
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
SITE_ADDRESS: $SITE_ADDRESS
volumes:
- ./docker/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- web
- app
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