-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
85 lines (80 loc) · 1.89 KB
/
docker-compose.dev.yml
File metadata and controls
85 lines (80 loc) · 1.89 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
services:
postgres:
image: postgres:15-alpine
ports:
- "${DB_PORT:-5434}:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 5
mailpit:
image: axllent/mailpit:latest
ports:
- "1025:1025"
- "8025:8025"
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "${MINIO_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_dev_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
retries: 5
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set minio http://minio:9000 minioadmin minioadmin &&
mc mb minio/kith-dev --ignore-existing
"
restart: "no"
app:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "4000:4000"
environment:
DB_HOST: postgres
DB_PORT: "5432"
SMTP_HOST: mailpit
PHX_IP: "0.0.0.0"
volumes:
- .:/app
- deps:/app/deps
- build:/app/_build
- node_modules:/app/assets/node_modules
depends_on:
postgres:
condition: service_healthy
command: >
sh -c "
mix deps.get &&
cd assets && npm install && cd .. &&
mix tailwind.install --if-missing &&
mix esbuild.install --if-missing &&
mix ecto.create &&
mix ecto.migrate &&
exec mix phx.server
"
volumes:
postgres_dev_data:
minio_dev_data:
deps:
build:
node_modules: