forked from BastianGanze/weebsync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
78 lines (75 loc) · 1.83 KB
/
docker-compose.dev.yml
File metadata and controls
78 lines (75 loc) · 1.83 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
# Development environment with separate client and server containers
#
# Benefits:
# - Independent debugging for client and server
# - Hot-reload for both Vue/Vite frontend and Node.js backend
# - Proper container networking and isolation
#
# Usage:
# docker compose -f docker-compose.dev.yml up
#
# Access:
# Client (Vue/Vite): http://localhost:8080
# Server API: http://localhost:42380
services:
weebsync-client:
build:
context: .
dockerfile: Dockerfile.dev
target: development
image: weebsync:dev
container_name: weebsync-client-dev
working_dir: /app
environment:
NODE_ENV: development
VITE_API_URL: http://weebsync-server:42380
ports:
- "8080:8080"
volumes:
- ./client:/app/client
- ./tmp:/app/shared
- /app/client/node_modules
command: >
/bin/sh -c "
echo 'Installing dependencies...' &&
yarn install &&
echo 'Starting client dev server...' &&
yarn client:dev --host 0.0.0.0 --port 8080
"
stdin_open: true
tty: true
networks:
- weebsync-dev
weebsync-server:
build:
context: .
dockerfile: Dockerfile.dev
target: development
image: weebsync:dev
container_name: weebsync-server-dev
working_dir: /app
environment:
NODE_ENV: development
DEBUG: "weebsync:*"
WEEB_SYNC_SERVER_HTTP_PORT: 42380
ports:
- "42380:42380"
volumes:
- ./server:/app/server
- ./shared:/app/shared
- ./build:/app/build
- ./plugins:/app/plugins
- /app/server/node_modules
command: >
/bin/sh -c "
echo 'Installing dependencies...' &&
yarn install &&
echo 'Starting server with hot-reload...' &&
yarn server:dev
"
stdin_open: true
tty: true
networks:
- weebsync-dev
networks:
weebsync-dev: