forked from mathesar-foundation/mathesar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
79 lines (78 loc) · 2.71 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
version: "3.9"
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:
container_name: mathesar_dev_db
command: ["postgres", "-c", "shared_preload_libraries=plugin_debugger"]
build:
context: .
dockerfile: Dockerfile.devdb
args:
PG_VERSION: ${PG_VERSION-13}
environment:
- PG_VERSION=${PG_VERSION-13}
- POSTGRES_DB=mathesar_django
- POSTGRES_USER=mathesar
- POSTGRES_PASSWORD=mathesar
ports:
- "5432:5432"
volumes:
- dev_postgres_data:/var/lib/postgresql/data
- ./db/sql:/sql/
test-service:
extends:
file: docker-compose.yml
service: service
environment:
- DJANGO_DATABASE_URL=postgres://mathesar:mathesar@mathesar_dev_db:5432/mathesar_django
- MATHESAR_DATABASES=(mathesar_tables|postgresql://mathesar:mathesar@mathesar_dev_db:5432/mathesar)
container_name: mathesar_service_test
image: mathesar/mathesar-test:latest
build:
context: .
dockerfile: Dockerfile
args:
PYTHON_REQUIREMENTS: requirements-dev.txt
depends_on:
- dev-db
# On testing, the HTTP port is exposed to other containers, and the host.
ports:
- "8000:8000"
# 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
build:
context: .
dockerfile: Dockerfile
args:
PYTHON_REQUIREMENTS: requirements-dev.txt
extends:
file: docker-compose.yml
service: service
environment:
- MODE=${MODE-DEVELOPMENT}
- DEBUG=${DEBUG-True}
- DJANGO_ALLOW_ASYNC_UNSAFE=true
- DJANGO_SUPERUSER_PASSWORD=password
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE-config.settings.development}
- DJANGO_DATABASE_URL=postgres://mathesar:mathesar@mathesar_dev_db:5432/mathesar_django
- MATHESAR_DATABASES=(mathesar_tables|postgresql://mathesar:mathesar@mathesar_dev_db:5432/mathesar)
entrypoint: dockerize -wait tcp://mathesar_dev_db:5432 -timeout 30s ./dev-run.sh
volumes:
- .:/code/
- ui_node_modules:/code/mathesar_ui/node_modules/
depends_on:
- dev-db
# On dev, following ports are exposed to other containers, and the host.
ports:
- "8000:8000"
- "3000:3000"
- "6006:6006"
volumes:
ui_node_modules:
dev_postgres_data: