-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
57 lines (53 loc) · 1.81 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
57 lines (53 loc) · 1.81 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
services:
# ── PostgreSQL (Example) ───────────────────────────────────────────────────
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: dbname
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d dbname" ]
interval: 10s
timeout: 5s
retries: 5
# ── pgAdmin (Example) ──────────────────────────────────────────────────────
pgadmin:
image: dpage/pgadmin4:latest
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.dev
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
postgres:
condition: service_healthy
# ── Runner (CLI Tooling) ───────────────────────────────────────────────────
# Utility service for one-off commands (lint, test, seed, scripts).
# Use: bash dx run <script>
runner:
build:
context: .
dockerfile: scripts/Dockerfile.runner
working_dir: /app
profiles: [ "tools" ] # Prevent starting automatically with 'up'
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
- DX_SERVICE_NAME=runner
# Uncomment when it is necessary to use an env file for the runner service
# env_file:
# - .env.docker
# Interactive shell by default
command: bash
volumes:
postgres_data:
pgadmin_data:
node_modules: