-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (58 loc) · 1.31 KB
/
docker-compose.yml
File metadata and controls
61 lines (58 loc) · 1.31 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
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
NITRO_PRESET: node-server
container_name: vite-react-graphql
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- NITRO_PORT=3000
- NITRO_HOST=0.0.0.0
restart: unless-stopped
networks:
- app-network
# Bun version (use with: docker compose --profile bun up)
bun:
build:
context: .
dockerfile: Dockerfile.bun
args:
NITRO_PRESET: bun
container_name: vite-react-graphql-bun
profiles:
- bun
ports:
- "3001:3000"
environment:
- NODE_ENV=production
- NITRO_PORT=3000
- NITRO_HOST=0.0.0.0
restart: unless-stopped
networks:
- app-network
# Development service (optional - use with docker compose --profile dev up)
dev:
image: node:24-alpine
container_name: vite-react-graphql-dev
working_dir: /app
profiles:
- dev
ports:
- "5173:5173"
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=development
command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev"
restart: unless-stopped
networks:
- app-network
networks:
app-network:
driver: bridge