-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (65 loc) · 2.15 KB
/
docker-compose.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
version: "3.8"
services:
backend:
build:
context: backend
dockerfile: Dockerfile.dev
volumes:
- ./backend/lib:/home/user/app/lib
- ./backend/priv:/home/user/app/priv
- ./backend/test:/home/user/app/test
- ./backend/config:/home/user/app/config
- ./backend/.formatter.exs:/home/user/app/.formatter.exs
- ./backend/mix.exs:/home/user/app/mix.exs
- ./backend/mix.lock:/home/user/app/mix.lock
- elixir_deps:/home/user/app/deps
- elixir_build:/home/user/app/_build
ports:
- 4000:4000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/api/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 15s
frontend:
build:
context: frontend
dockerfile: Dockerfile.dev
working_dir: /home/node/app
environment:
VITE_WEBSOCKET_BASE_URL: ws://localhost:4000
volumes:
- ./frontend/tsconfig.json:/home/node/app/tsconfig.json
- ./frontend/tsconfig.vitest.json:/home/node/app/tsconfig.vitest.json
- ./frontend/vitest.config.ts:/home/node/app/vitest.config.ts
- ./frontend/tsconfig.app.json:/home/node/app/tsconfig.app.json
- ./frontend/tsconfig.node.json:/home/node/app/tsconfig.node.json
- ./frontend/vite.config.ts:/home/node/app/vite.config.ts
- ./frontend/index.html:/home/node/app/index.html
- ./frontend/env.d.ts:/home/node/app/env.d.ts
- ./frontend/src:/home/node/app/src
- ./frontend/public:/home/node/app/public
- ./frontend/package.json:/home/node/app/package.json
- ./frontend/package-lock.json:/home/node/app/package-lock.json
- node_modules_cache_frontend:/home/node/app/node_modules
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5173/"]
interval: 30s
timeout: 5s
retries: 5
start_period: 15s
command: /bin/sh -c " npm install && npm run dev"
ports:
- 5173:5173
entrypoint:
image: "busybox:latest"
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
volumes:
node_modules_cache_frontend:
elixir_deps:
elixir_build: