-
-
Notifications
You must be signed in to change notification settings - Fork 470
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
119 lines (119 loc) · 4 KB
/
docker-compose.dev.yml
File metadata and controls
119 lines (119 loc) · 4 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
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
---
services:
# Mathesar App built with the same configurations as the production image
# but with additional testing dependencies.
# It is used to run automated test cases to verify if the app works as intended
dev-db-base:
command: ["postgres", "-c", "shared_preload_libraries=plugin_debugger"]
build:
context: .
dockerfile: Dockerfile.devdb
args:
PG_VERSION: ${PG_VERSION-17}
environment:
- PG_VERSION=${PG_VERSION-17}
- POSTGRES_DB=mathesar_django
- POSTGRES_USER=mathesar
- POSTGRES_PASSWORD=mathesar
- PGDATA=/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB-mathesar_django} -U $${POSTGRES_USER-mathesar}"]
interval: 5s
timeout: 1s
retries: 30
start_period: 5s
dev-db:
container_name: mathesar_dev_db
extends:
service: dev-db-base
ports:
- "5432:5432"
volumes:
- dev_postgres_data:/var/lib/postgresql/data
- dev_postgres_socket:/var/run/postgresql
- ./db/sql:/sql/
# An S3-compatible object store for local development. Don't use in prod.
obj-store:
container_name: mathesar-dev-store
image: quay.io/minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=mathesar
- MINIO_ROOT_PASSWORD=mathesar
command: server --console-address ":9001" /data
volumes:
- dev_obj_store_data:/data
# A Django development webserver + Svelte development server used when developing Mathesar.
# The code changes are hot reloaded and debug flags are enabled to aid developers working on Mathesar.
# It is not recommended to use this service in production environment.
dev-service:
container_name: mathesar_service_dev
image: mathesar/mathesar-dev:latest
pull_policy: never
build:
context: .
target: development
dockerfile: Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION-3.14-bookworm}
environment:
- MODE=${MODE-DEVELOPMENT}
- SKIP_STATIC_COLLECTION=true
- DEBUG=${DEBUG-True}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE-config.settings.development}
- ALLOWED_HOSTS=${ALLOWED_HOSTS-*}
- SECRET_KEY=${SECRET_KEY-}
- OIDC_CONFIG_DICT=${OIDC_CONFIG_DICT-{}}
- FILE_STORAGE_DICT=${FILE_STORAGE_DICT-{}}
- MATHESAR_ANALYTICS_URL=${MATHESAR_ANALYTICS_URL-https://example.com/collector}
- MATHESAR_INIT_REPORT_URL=${MATHESAR_INIT_REPORT_URL-https://example.com/hello}
- MATHESAR_FEEDBACK_URL=${MATHESAR_FEEDBACK_URL-https://example.com/feedback}
- DJANGO_SUPERUSER_PASSWORD=password
- POSTGRES_DB=mathesar_django
- POSTGRES_USER=mathesar
- POSTGRES_PASSWORD=mathesar
- POSTGRES_HOST=${POSTGRES_HOST-mathesar_dev_db} # replace mathesar_dev_db with /var/dev_postgres_socket for connecting to mathesar_dev_db via unix socket instead
- POSTGRES_PORT=5432
volumes:
- .:/code/
- dev_postgres_socket:/var/dev_postgres_socket
- ui_node_modules:/code/mathesar_ui/node_modules/
- mathesar_secrets:/code/.secrets/
depends_on:
dev-db:
condition: service_healthy
# On dev, following ports are exposed to other containers, and the host.
ports:
- "8000:8000"
- "3000:3000"
- "6006:6006"
test-service:
container_name: mathesar_service_test
image: mathesar/mathesar-test:latest
environment:
- POSTGRES_DB=mathesar_django
- POSTGRES_USER=mathesar
- POSTGRES_PASSWORD=mathesar
- POSTGRES_HOST=${POSTGRES_HOST-mathesar_dev_db}
- POSTGRES_PORT=5432
pull_policy: never
build:
context: .
target: ${TARGET-testing}
dockerfile: Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION-3.14-bookworm}
volumes:
- dev_postgres_socket:/var/dev_postgres_socket
depends_on:
- dev-db
ports:
- "8000:8000"
volumes:
ui_node_modules:
dev_postgres_data:
dev_postgres_socket:
dev_obj_store_data:
mathesar_secrets: