-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
61 lines (57 loc) · 1.66 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
##
# This composer is used for local development and testing.
# It runs the following services:
# - Postgres database
# - Qdrant vector database
#
# Notice it does not run the Django application itself. You'll have to tun the Django application locally
# (to benefit from hot-reloading) using the following command:
# `poetry run manage runserver`
#
# Neither does it run the Celery worker. In fact, Celery is not used in local development
# mostly because of a segfault bug on M1 machines when run workers are run locally.
# I was not able to solve it despite reading issues/answers on Github and StackOverflow.
# See:
# - https://github.com/celery/celery/issues/7007
# - https://github.com/celery/celery/issues/5867#issuecomment-564581217
#
# To run the stack, use the following command:
# `docker-compose -f docker-compose.dev.yml up`
#
# To stop the stack, use the following command:
# `docker-compose -f docker-compose.dev.yml down`
#
# To run the stack in the background, use the following command:
# `docker-compose -f docker-compose.dev.yml up -d`
##
version: '3.8'
services:
# Postgres database for the application
postgres:
# Use an image tailored for MacOS M1
image: amd64/postgres:14
platform: linux/amd64
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_HOST
volumes:
- postgres_data:/var/lib/postgres/data/
ports:
- "5432:5432"
networks:
- martini_network
# Qdrant vector database
qdrant:
image: qdrant/qdrant
ports:
- "6333:6333"
networks:
- martini_network
volumes:
postgres_data:
driver: local
networks:
martini_network:
driver: bridge